Skip to content
Snippets Groups Projects
Commit 31715c78 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Refactoring and some minor fixes of RasPi generator and extensions.

parent ea2aae2c
No related branches found
No related tags found
No related merge requests found
Showing
with 141 additions and 277 deletions
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
<copyright>
</copyright>
| |
-->
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
......@@ -113,7 +106,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.RaspberryPIExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.RaspberryPIGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -126,7 +119,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanConnectorExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.CanConnectorGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -139,7 +132,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.CanTransmissionCatalog">
</objectClass>
</target>
</transformationProvider>
......@@ -152,7 +145,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.CanTransmissionCatalog">
</objectClass>
</target>
</transformationProvider>
......@@ -165,7 +158,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.motorcontrol.MotorControlInputExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.motorcontrol.MotorControlInputGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -178,7 +171,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.motorcontrol.MotorControlOutputExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.motorcontrol.MotorControlOutputGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -191,7 +184,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.ConsoleOutputExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.ConsoleOutputGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -204,7 +197,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.brick.UltraSonicSensorExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.brick.UltraSonicSensorGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -217,7 +210,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.brick.LaserRangeSensorExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.brick.LaserRangeSensorGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -230,7 +223,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.PWMActuatorExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.PWMActuatorGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -243,7 +236,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Button1GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -256,7 +249,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Button2GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -269,7 +262,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Button3GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -282,7 +275,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Button4GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -295,7 +288,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.ButtonL1GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -308,7 +301,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.ButtonL2GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -321,7 +314,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.ButtonR1GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -334,7 +327,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.ButtonR2GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -347,7 +340,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Left_StickXGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -360,7 +353,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Left_StickYGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -373,7 +366,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Right_StickXGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -386,7 +379,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickYExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.gamepad.Right_StickYGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -400,7 +393,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonAExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonAGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -414,7 +407,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonBExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonBGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -428,7 +421,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonXExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonXGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -442,7 +435,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonYExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonYGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -456,7 +449,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonStartExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonStartGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -470,7 +463,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonSelectExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonSelectGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -484,7 +477,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonHomeExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonHomeGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -498,7 +491,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL1Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonL1GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -512,7 +505,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL3Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonL3GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -526,7 +519,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR1Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonR1GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -540,7 +533,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR3Executable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.ButtonR3GeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -554,7 +547,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadDownExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.DPadDownGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -568,7 +561,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadUpExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.DPadUpGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -582,7 +575,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadLeftExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.DPadLeftGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -596,7 +589,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadRightExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.DPadRightGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -610,7 +603,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickXExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.Left_StickXGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -623,7 +616,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickYExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.Left_StickYGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -636,7 +629,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickXExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.Right_StickXGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -649,7 +642,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickYExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.Right_StickYGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -662,7 +655,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.L2PositionExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.L2PositionGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -675,7 +668,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.R2PositionExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.R2PositionGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......@@ -688,7 +681,7 @@
</source>
<target>
<objectClass
objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.SimpleRumbleFeatureExecutable">
objectClass="org.fortiss.af3.platform.raspberry.generator.extension.rumblepad.SimpleRumbleFeatureGeneratorExtension">
</objectClass>
</target>
</transformationProvider>
......
CanBusExecutable.java a6d7a7767a1eae9770007e98115ead912f8a6e47 RED
CanConnectorExecutable.java ed13a0d5b71eae473ddec911cb572780660c85a4 RED
CanTransmissionCatalog.java ec4637eda80234429a9f382a37713588a0fbb83a RED
ConsoleOutputExecutable.java 599295ac093cbc5f2913be9c92094588c7276543 YELLOW
HeaderCopyGenerator.java 18239a3adae35256e32dad19df9d8f38acbf7e66 RED
MultiUnitMainGenerator.java 458754b89c2d79db3fee08baa444424772e40fb7 RED
PWMActuatorExecutable.java d5d75c70ec12a3e008f744ff15b3c103b5d57f6c YELLOW
RaspberryPIExecutable.java cafff8199da9cc59688289c9c26097e6872e9702 RED
SingleUnitMainGenerator.java f97602fcb3bd8941260b7de3b27ea1a281b0b752 RED
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
import static org.fortiss.af3.generator.common.utils.SourceModelElementFactory.createByteContentUnitForPluginFileInRCP;
import org.fortiss.af3.generator.common.model.c.CSourcePackage;
import org.fortiss.af3.generator.common.model.source.ByteContentUnit;
import org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator;
/** Class for copying the header files to the target folder. */
final class HeaderCopyGenerator {
/** Adds the header files to the given target {@link CSourcePackage}. */
public static void copyHeaderFiles(CSourcePackage incLibPack) throws Exception {
incLibPack.addUnit(copyAF3Hal("af3.h"));
incLibPack.addUnit(copyAF3Hal("af3_component.h"));
incLibPack.addUnit(copyAF3Hal("af3_component_remote_proxy.h"));
incLibPack.addUnit(copyAF3Hal("camera_client.h"));
incLibPack.addUnit(copyAF3Hal("cancatalog.h"));
incLibPack.addUnit(copyAF3Hal("caninbox.h"));
incLibPack.addUnit(copyAF3Hal("canoutbox.h"));
incLibPack.addUnit(copyAF3Hal("cansocket.h"));
incLibPack.addUnit(copyAF3Hal("canthread.h"));
incLibPack.addUnit(copyAF3Hal("debugprint.h"));
incLibPack.addUnit(copyAF3Hal("gamepad.h"));
incLibPack.addUnit(copyAF3Hal("listutil.h"));
incLibPack.addUnit(copyAF3Hal("rumblepad.h"));
incLibPack.addUnit(copyAF3Hal("protocol_can.h"));
incLibPack.addUnit(copyAF3Hal("protocol_control_center.h"));
incLibPack.addUnit(copyAF3Hal("protocol_coordinator.h"));
incLibPack.addUnit(copyAF3Hal("protocol_factory.h"));
incLibPack.addUnit(copyAF3Hal("protocol_worker.h"));
incLibPack.addUnit(copyAF3Hal("temp_actuator.h"));
incLibPack.addUnit(copyAF3Hal("timeutil.h"));
incLibPack.addUnit(copyBrick("ip_connection.h"));
incLibPack.addUnit(copyBrick("bricklet_distance_us.h"));
incLibPack.addUnit(copyBrick("bricklet_laser_range_finder.h"));
incLibPack.addUnit(copyBrick("bricklet_rgb_led_button.h"));
incLibPack.addUnit(copyBrick("brick_imu_v2.h"));
incLibPack.addUnit(copyBrick("bricklet_segment_display_4x7.h"));
incLibPack.addUnit(copyDataHal("data.h"));
}
/** Copies the AF3 HAL header file. */
private static ByteContentUnit copyDataHal(String header) throws Exception {
return copyHeader("data", header);
}
/** Copies the AF3 HAL header file. */
private static ByteContentUnit copyAF3Hal(String header) throws Exception {
return copyHeader("af3pihal", header);
}
/** Copies the brick header file. */
private static ByteContentUnit copyBrick(String header) throws Exception {
return copyHeader("brick", header);
}
/** Copies the header file from the plugin path. */
private static ByteContentUnit copyHeader(String subDir, String headerName) throws Exception {
return createByteContentUnitForPluginFileInRCP(AF3PlatformRaspberryActivator.PLUGIN_ID,
"code-gen-hal/inc/" + subDir, headerName, false);
}
}
BrickExecutableBase.java e50fae1024e2f95953ff5cb2b56eb0250918021c YELLOW
LaserRangeSensorExecutable.java a06ec7216bc2c48ec5a55b85b974f0bd3b3178e5 YELLOW
UltraSonicSensorExecutable.java 7e121aa85b389b04f4e30fa54d695331082cb4b6 YELLOW
IInstanceExecutable.java 3affc638b5802896ff7bfae6f9185fc0dfa8c8d2 YELLOW
IInstanceInitializationExecutable.java 6941c4eb9622149d548f338c6727541cd23895ce YELLOW
IInstanceTerminationExecutable.java 2663162a843e8954a11083d78e16b17659df0d27 YELLOW
IRasPiHeaderExecutable.java f14b5714e7b982e097f6ac6e95eb91223a30d048 YELLOW
IRasPiLibraryBasedExecutable.java cf3548f22185e666fdcf6d4658b783734c0e5e8e YELLOW
IRasPiSourceBasedExecutable.java 79646213964346ace17013f5c8df5de13dafb1f0 YELLOW
IReadableExecutable.java b50e2e1b3dc6d3557a3c923765b65b769960a95e YELLOW
ISingletonExecutable.java d7a794f50cf4746fa9378ffaa89283130b5273b1 YELLOW
ISingletonInitializationExecutable.java 973c7305f5b0c26e03d9294d2b481caada29053c YELLOW
ISingletonTerminationExecutable.java a55e86fc68c083eaa7a81b4d08bafacd72c701b2 YELLOW
IWriteableExecutable.java 43b0b80631fdd6e9f13cdc6fe3e63bbb98c62647 YELLOW
Button1Executable.java 4419314d71af50239cf6933a83a0f652614cf368 YELLOW
Button2Executable.java 3af03ceea3aa09178fe88fe630c94282de0b72f2 YELLOW
Button3Executable.java 964fbe4e0b5282ab617c4be2bed31afa8b4f394f YELLOW
Button4Executable.java 53db1cce9e3dfface4027f883586bf90638cd4ff YELLOW
ButtonExecutableBase.java 00be5129edbdc2a3a973b15921b74c7ac11f944e YELLOW
ButtonL1Executable.java ab68cddae1d323ff0ecd7956133c44d1ef0f9168 YELLOW
ButtonL2Executable.java 336b9d8d26a682b701f7a2ca078369c9cc621fbb YELLOW
ButtonR1Executable.java 700ef701ed77a0d3f8141166fe647ac5cd4ad570 YELLOW
ButtonR2Executable.java 9b4acdc37505f41c60d8216c92bcbd3f43a2ccec YELLOW
GamepadExecutableBase.java fd54ded0437b7426df3f23c724bbcda873dbcdd1 YELLOW
Left_StickXExecutable.java c3e7f28f44fa27bd79e14ed7e60f44be2dc5a9ab YELLOW
Left_StickYExecutable.java f81cc1e3124eb712507825bc54e7d0f633fde640 YELLOW
Right_StickXExecutable.java ade165c88d0c6758efa167e5ba445eff87a0fd79 YELLOW
Right_StickYExecutable.java 891ea877d8c3f4bab6072a02b17bb92a6caa055d YELLOW
StickExecutableBase.java 561a77c160dc27f13d6d6959a2285a0bf07d5096 YELLOW
BrickLibraryExecutableBase.java 3556b41e6ca909aaf89fa58eac31c63d0cfeb788 YELLOW
PiHALLibraryExecutableBase.java d64da670a3f39ef53a8f548955f35b588308ba76 YELLOW
MotorControlExecutableBase.java 48d568df87fa1e15588b830065762ad73ff12f97 YELLOW
MotorControlInputExecutable.java a6162b9bd9b98997f1b3cc8eb63232338e3e84a8 RED
MotorControlOutputExecutable.java 26aef1e59d43c0370246e082a3d401a5c378fd03 RED
ButtonAExecutable.java bbcb151d851b1b3d3e97b7e11b790fa13559fd96 YELLOW
ButtonBExecutable.java d659e04dc60cba0808bd2fceae22fcbc1bd203a9 YELLOW
ButtonExecutableBase.java 578104b5b572ee49ddcc142d165e10eec07e1738 YELLOW
ButtonHomeExecutable.java e3a19a82d2cafd3bc75b6a7fc1a75df5656df48c YELLOW
ButtonL1Executable.java 68fac6c2abc7ea40eb7cc16839677a4cdc24111a YELLOW
ButtonL3Executable.java 2d04b51ee7ab822419140cf69821bbcbcfded359 YELLOW
ButtonR1Executable.java cc9b1332e442f3875191fdc2d4fa26bcc94f1b13 YELLOW
ButtonR3Executable.java 4eb79b5e65829beeb0c65686c2ee1b97af02c60b YELLOW
ButtonSelectExecutable.java a141f9ea800c48c10f9a1695fe7c730873a3b021 YELLOW
ButtonStartExecutable.java d5dae399a944aafdccb80fea4273686afeaf65a8 YELLOW
ButtonXExecutable.java 1bd0abb2cd33731bc1a501c5b523074a37847512 YELLOW
ButtonYExecutable.java 703c9497600ca405b7dc2adb143179cf12aa5806 YELLOW
DPadDownExecutable.java f19d39030b1370ea0d0f00727dd7e75635442760 YELLOW
DPadLeftExecutable.java 1026fae470429fb99427adfccf494832f504a378 YELLOW
DPadRightExecutable.java f354bdd8767b4c28e419dcb514f47521a526a01b YELLOW
DPadUpExecutable.java e7a11870695ede63519696b071d30a4c93d6f9d3 YELLOW
L2PositionExecutable.java 6d75fd0b020819a38b1c3ddda9aa9ed536832108 YELLOW
Left_StickXExecutable.java 41667a015567298cfceee981d8c1f309e6cd97b5 YELLOW
Left_StickYExecutable.java cc2b36f9bca913dc1956f34495cf9c77acb13c88 YELLOW
R2PositionExecutable.java 19f778392841d02d281fd856564b75e1333dffaa YELLOW
Right_StickXExecutable.java 97656a2ae56a70eac88153b123f2cd9c584af967 YELLOW
Right_StickYExecutable.java f3d942123ca47d0ddbf32f4f46bfaf2b21732653 YELLOW
RumblepadExecutableBase.java 39b4d75bed6526d82f5baa420b2415b271157df9 YELLOW
SimpleRumbleFeatureExecutable.java 413b6fb3f5847f0d09f52341c98b95f74c352016 YELLOW
StickExecutableBase.java 4e1188b3e3a3b6d53a6387d2cf472c89c27b7449 YELLOW
CanBusGeneratorExtension.java 4bed3c88e71923515d7d9dc9235bc40a49ce237f RED
CanConnectorGeneratorExtension.java 6ca987deb8c2ba4d47609691563570bf6e3d7306 RED
CanTransmissionCatalog.java 959d488ebec4ae6a50c3f699d42aad535b1ae0c3 YELLOW
ConsoleOutputGeneratorExtension.java d57db44d57630a50e26c9eeed90d6631bf99db5d YELLOW
MultiUnitMainGenerator.java 458754b89c2d79db3fee08baa444424772e40fb7 RED
PWMActuatorGeneratorExtension.java 8cbfd72070cfc1c8a4da4ccc1d18a6b3e75cea7f YELLOW
RaspberryPIGeneratorExtension.java 9822dd93e32d3287c1446eb94333d2ca55ff4274 RED
SingleUnitMainGenerator.java 93d0370b01330ab023e02761df818d36fac42b0f RED
......@@ -13,7 +13,7 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import java.util.List;
import java.util.Map;
......@@ -27,10 +27,10 @@ import org.fortiss.af3.platform.model.TransmissionUnit;
import org.fortiss.af3.platform.raspberry.model.CanBus;
/** Executable for {@link CanBus}. */
public class CanBusExecutable extends TransmissionUnitExecutableBase<TransmissionUnit> {
public class CanBusGeneratorExtension extends TransmissionUnitExecutableBase<TransmissionUnit> {
/** Constructor. */
public CanBusExecutable(TransmissionUnit modelElement) {
public CanBusGeneratorExtension(TransmissionUnit modelElement) {
super(modelElement);
// no functionality as of now
}
......
......@@ -13,7 +13,7 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall;
import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.rawString;
......@@ -29,10 +29,10 @@ import org.fortiss.af3.platform.language.executable.TransceiverExecutableBase;
import org.fortiss.af3.platform.raspberry.model.CanConnector;
/** Executable for {@link CanConnector}s. */
public class CanConnectorExecutable extends TransceiverExecutableBase<CanConnector> {
public class CanConnectorGeneratorExtension extends TransceiverExecutableBase<CanConnector> {
/** Constructor. */
public CanConnectorExecutable(CanConnector modelElement) {
public CanConnectorGeneratorExtension(CanConnector modelElement) {
super(modelElement);
}
......
......@@ -13,28 +13,34 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.findSourcePort;
import java.util.HashMap;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.deployment.generator.TransmissionCatalog;
import org.fortiss.af3.deployment.model.ComponentAllocation;
import org.fortiss.af3.deployment.model.Deployment;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
/** Can Transmission Catalog */
/**
* This class analyzes a {@link Deployment}, its {@link PlatformArchitecture} and its
* {@link ComponentArchitecture} and creates mappings, which are used by the
* {@link RaspberryPIGeneratorExtension}.
*/
public class CanTransmissionCatalog extends TransmissionCatalog {
/** Mapping from atomic component to deployed execution unit. */
/** Mapping from atomic component to the execution unit it is deployed on. */
private HashMap<Component, RaspberryPi> componentToRaspberry = new HashMap<>();
/** Mapping from execution unit to CAN IDs. */
/** Mapping from execution unit to generated CAN IDs starting from {@code canIdCounter}. */
private HashMap<RaspberryPi, Integer> raspberryCanId = new HashMap<>();
/** Counter for raspberry CAN IDs. */
/** Counter for generated CAN IDs. */
private int canIdCounter = 0xF;
/** Mapping from atomic input port to atomic output port. */
private HashMap<InputPort, OutputPort> atomicInputToOutput = new HashMap<>();
......
......@@ -13,20 +13,20 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.af3.expression.model.types.TDouble;
import org.fortiss.af3.platform.language.executable.ExecutableBase;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IWriteableExecutable;
import org.fortiss.af3.platform.raspberry.generator.framework.IWriteableGeneratorExtension;
import org.fortiss.af3.platform.raspberry.model.ConsoleOutput;
import org.fortiss.af3.project.model.typesystem.IType;
/** Executable for {@link ConsoleOutput}. */
public class ConsoleOutputExecutable extends ExecutableBase<ConsoleOutput> implements
IWriteableExecutable {
public class ConsoleOutputGeneratorExtension extends ExecutableBase<ConsoleOutput> implements
IWriteableGeneratorExtension {
/** Constructor. */
public ConsoleOutputExecutable(ConsoleOutput modelElement) {
public ConsoleOutputGeneratorExtension(ConsoleOutput modelElement) {
super(modelElement);
}
......
......@@ -13,7 +13,7 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.findSourcePort;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.isAtomicComponent;
......
......@@ -13,20 +13,20 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.ISingletonInitializationExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.ISingletonTerminationExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IWriteableExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.library.PiHALLibraryExecutableBase;
import org.fortiss.af3.platform.raspberry.generator.extension.library.PiHALLibraryGeneratorExtensionBase;
import org.fortiss.af3.platform.raspberry.generator.framework.ISingletonInitializationGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.ISingletonTerminationGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IWriteableGeneratorExtension;
import org.fortiss.af3.platform.raspberry.model.ActuatorPWM;
/** Executable for {@link ActuatorPWM}. */
public class PWMActuatorExecutable extends PiHALLibraryExecutableBase<ActuatorPWM> implements
ISingletonInitializationExecutable, IWriteableExecutable, ISingletonTerminationExecutable {
public class PWMActuatorGeneratorExtension extends PiHALLibraryGeneratorExtensionBase<ActuatorPWM> implements
ISingletonInitializationGeneratorExtension, IWriteableGeneratorExtension, ISingletonTerminationGeneratorExtension {
/** Constructor. */
public PWMActuatorExecutable(ActuatorPWM modelElement) {
public PWMActuatorGeneratorExtension(ActuatorPWM modelElement) {
super(modelElement);
}
......
......@@ -13,7 +13,7 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.isAtomicComponent;
import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.createDataDictionary;
......@@ -52,16 +52,16 @@ import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.PlatformConnectorUnit;
import org.fortiss.af3.platform.model.TransmissionUnit;
import org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IRasPiHeaderExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IRasPiLibraryBasedExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IRasPiSourceBasedExecutable;
import org.fortiss.af3.platform.raspberry.generator.framework.IRasPiHeaderGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IRasPiLibraryBasedGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IRasPiSourceBasedGeneratorExtension;
import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
import org.fortiss.tooling.kernel.extension.exception.ChainTransformationFailedException;
/** {@link ExecutionUnitExecutableBase} for the {@link RaspberryPi} platform. */
public class RaspberryPIExecutable extends ExecutionUnitExecutableBase<RaspberryPi, CSourcePackage> {
public class RaspberryPIGeneratorExtension extends ExecutionUnitExecutableBase<RaspberryPi, CSourcePackage> {
/** Folder name for library source files. */
private static final String SRC_LIB_SUB_PACKAGE_NAME = "src-lib";
/** Folder name for library include files. */
......@@ -96,7 +96,7 @@ public class RaspberryPIExecutable extends ExecutionUnitExecutableBase<Raspberry
private CSourcePackage generatorResult;
/** Constructor. */
public RaspberryPIExecutable(RaspberryPi modelElement) {
public RaspberryPIGeneratorExtension(RaspberryPi modelElement) {
super(modelElement);
}
......@@ -136,8 +136,8 @@ public class RaspberryPIExecutable extends ExecutionUnitExecutableBase<Raspberry
ExecutableBase<?> executable =
createTransformedObjectWithoutExceptionFor(pcu, ExecutableBase.class, context);
platformConnector2ExecutableBase.put(pcu, executable);
if(executable instanceof IRasPiHeaderExecutable) {
IRasPiHeaderExecutable headerExec = (IRasPiHeaderExecutable)executable;
if(executable instanceof IRasPiHeaderGeneratorExtension) {
IRasPiHeaderGeneratorExtension headerExec = (IRasPiHeaderGeneratorExtension)executable;
if(!includedHeaders.contains(headerExec.getHeaderFileName())) {
generatorResult.getSubPackage(INC_LIB_SUB_PACKAGE_NAME).addUnit(
headerExec.getHeaderFileContent());
......@@ -145,8 +145,8 @@ public class RaspberryPIExecutable extends ExecutionUnitExecutableBase<Raspberry
}
// ignore header file, since it is already included
}
if(executable instanceof IRasPiSourceBasedExecutable) {
IRasPiSourceBasedExecutable srcExec = (IRasPiSourceBasedExecutable)executable;
if(executable instanceof IRasPiSourceBasedGeneratorExtension) {
IRasPiSourceBasedGeneratorExtension srcExec = (IRasPiSourceBasedGeneratorExtension)executable;
if(!includedSources.contains(srcExec.getSourceFileName())) {
generatorResult.getSubPackage(SRC_LIB_SUB_PACKAGE_NAME).addUnit(
srcExec.getSourceFileContent());
......@@ -154,8 +154,8 @@ public class RaspberryPIExecutable extends ExecutionUnitExecutableBase<Raspberry
}
// ignore source file, since it is already included
}
if(executable instanceof IRasPiLibraryBasedExecutable) {
IRasPiLibraryBasedExecutable libExec = (IRasPiLibraryBasedExecutable)executable;
if(executable instanceof IRasPiLibraryBasedGeneratorExtension) {
IRasPiLibraryBasedGeneratorExtension libExec = (IRasPiLibraryBasedGeneratorExtension)executable;
if(!includedLibraries.contains(libExec.getLibraryFileName())) {
generatorResult.getSubPackage(LIB_SUB_PACKAGE_NAME).addUnit(
libExec.getLibraryFileContent());
......
......@@ -13,7 +13,7 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
package org.fortiss.af3.platform.raspberry.generator.extension;
import static org.fortiss.af3.component.generator.c.ComponentProgramToCSourcePackageTransformation.getPortNoValIdentifier;
import static org.fortiss.af3.component.generator.component.PortVariableUtils.getPortIdentifier;
......@@ -36,12 +36,12 @@ import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.PlatformConnectorUnit;
import org.fortiss.af3.platform.model.Receiver;
import org.fortiss.af3.platform.model.Transmitter;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IInstanceExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IInstanceInitializationExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IReadableExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.ISingletonExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.ISingletonInitializationExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.IWriteableExecutable;
import org.fortiss.af3.platform.raspberry.generator.framework.IInstanceGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IInstanceInitializationGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IReadableGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.ISingletonGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.ISingletonInitializationGeneratorExtension;
import org.fortiss.af3.platform.raspberry.generator.framework.IWriteableGeneratorExtension;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
......@@ -98,9 +98,9 @@ class SingleUnitMainGenerator {
for(PlatformConnectorUnit pcu : platformConnector2ExecutableBase.keySet()) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(pcu);
String sPostfix = null;
if(exec instanceof ISingletonInitializationExecutable) {
ISingletonInitializationExecutable singletonExec =
(ISingletonInitializationExecutable)exec;
if(exec instanceof ISingletonInitializationGeneratorExtension) {
ISingletonInitializationGeneratorExtension singletonExec =
(ISingletonInitializationGeneratorExtension)exec;
// check if function definition was already included
String ident = singletonExec.getSingletonIdentifier();
sPostfix = singletonPostfixMap.get(ident);
......@@ -111,9 +111,9 @@ class SingleUnitMainGenerator {
}
}
// sPostfix is set by first if-block or remains null
if(exec instanceof IInstanceInitializationExecutable) {
IInstanceInitializationExecutable initExec =
(IInstanceInitializationExecutable)exec;
if(exec instanceof IInstanceInitializationGeneratorExtension) {
IInstanceInitializationGeneratorExtension initExec =
(IInstanceInitializationGeneratorExtension)exec;
String iPostfix = instancePostfixMap.get(initExec);
String def = initExec.getInstanceAuxiliaryFunctions(iPostfix, sPostfix);
sb.append(def != null ? def : "");
......@@ -170,9 +170,9 @@ class SingleUnitMainGenerator {
for(PlatformConnectorUnit pcu : platformConnector2ExecutableBase.keySet()) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(pcu);
String sPostfix = null;
if(exec instanceof ISingletonInitializationExecutable) {
ISingletonInitializationExecutable singletonExec =
(ISingletonInitializationExecutable)exec;
if(exec instanceof ISingletonInitializationGeneratorExtension) {
ISingletonInitializationGeneratorExtension singletonExec =
(ISingletonInitializationGeneratorExtension)exec;
// check if variable declaration was already included
String ident = singletonExec.getSingletonIdentifier();
sPostfix = singletonPostfixMap.get(ident);
......@@ -183,9 +183,9 @@ class SingleUnitMainGenerator {
}
}
// sPostfix is set by first if-block or remains null
if(exec instanceof IInstanceInitializationExecutable) {
IInstanceInitializationExecutable initExec =
(IInstanceInitializationExecutable)exec;
if(exec instanceof IInstanceInitializationGeneratorExtension) {
IInstanceInitializationGeneratorExtension initExec =
(IInstanceInitializationGeneratorExtension)exec;
String iPostfix = instancePostfixMap.get(initExec);
String def = initExec.getVariableDeclaration(iPostfix, sPostfix);
sb.append(def != null ? def : "");
......@@ -304,13 +304,13 @@ class SingleUnitMainGenerator {
private String createWriteCode(Transmitter transmitter, OutputPort outport) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(transmitter);
String sPostfix = null;
if(exec instanceof ISingletonExecutable) {
if(exec instanceof ISingletonGeneratorExtension) {
sPostfix =
singletonPostfixMap.get(((ISingletonExecutable)exec).getSingletonIdentifier());
singletonPostfixMap.get(((ISingletonGeneratorExtension)exec).getSingletonIdentifier());
}
String iPostfix = instancePostfixMap.get(exec);
if(exec instanceof IWriteableExecutable) {
IWriteableExecutable wexec = (IWriteableExecutable)exec;
if(exec instanceof IWriteableGeneratorExtension) {
IWriteableGeneratorExtension wexec = (IWriteableGeneratorExtension)exec;
String sourceVariable = getPortIdentifier(outport);
String writeCode = wexec.getWriteCode(iPostfix, sPostfix, outport, sourceVariable);
String novalCode = wexec.getNoValWriteCode(iPostfix, sPostfix, outport);
......@@ -329,13 +329,13 @@ class SingleUnitMainGenerator {
private String createReadCode(Receiver receiver, InputPort inport) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(receiver);
String sPostfix = null;
if(exec instanceof ISingletonExecutable) {
if(exec instanceof ISingletonGeneratorExtension) {
sPostfix =
singletonPostfixMap.get(((ISingletonExecutable)exec).getSingletonIdentifier());
singletonPostfixMap.get(((ISingletonGeneratorExtension)exec).getSingletonIdentifier());
}
String iPostfix = instancePostfixMap.get(exec);
if(exec instanceof IReadableExecutable) {
IReadableExecutable rexec = (IReadableExecutable)exec;
if(exec instanceof IReadableGeneratorExtension) {
IReadableGeneratorExtension rexec = (IReadableGeneratorExtension)exec;
String targetVariable = getPortIdentifier(inport);
String readCode = rexec.getReadCode(iPostfix, sPostfix, inport, targetVariable);
String novalCode = rexec.getNoValReadCode(iPostfix, sPostfix, inport);
......@@ -355,9 +355,9 @@ class SingleUnitMainGenerator {
for(PlatformConnectorUnit pcu : platformConnector2ExecutableBase.keySet()) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(pcu);
String sPostfix = null;
if(exec instanceof ISingletonInitializationExecutable) {
ISingletonInitializationExecutable singletonExec =
(ISingletonInitializationExecutable)exec;
if(exec instanceof ISingletonInitializationGeneratorExtension) {
ISingletonInitializationGeneratorExtension singletonExec =
(ISingletonInitializationGeneratorExtension)exec;
String ident = singletonExec.getSingletonIdentifier();
sPostfix = singletonPostfixMap.get(ident);
if(!singletonInitDone.contains(ident)) {
......@@ -367,9 +367,9 @@ class SingleUnitMainGenerator {
}
}
// sPostfix is set in the first if-block or is null
if(exec instanceof IInstanceInitializationExecutable) {
IInstanceInitializationExecutable initExec =
(IInstanceInitializationExecutable)exec;
if(exec instanceof IInstanceInitializationGeneratorExtension) {
IInstanceInitializationGeneratorExtension initExec =
(IInstanceInitializationGeneratorExtension)exec;
String iPostfix = instancePostfixMap.get(initExec);
String code = initExec.getInitializationCode(iPostfix, sPostfix);
sb.append(code != null ? code : "");
......@@ -385,14 +385,14 @@ class SingleUnitMainGenerator {
private void computePostfixes() {
for(PlatformConnectorUnit pcu : platformConnector2ExecutableBase.keySet()) {
ExecutableBase<?> exec = platformConnector2ExecutableBase.get(pcu);
if(exec instanceof ISingletonExecutable) {
String id = ((ISingletonExecutable)exec).getSingletonIdentifier();
if(exec instanceof ISingletonGeneratorExtension) {
String id = ((ISingletonGeneratorExtension)exec).getSingletonIdentifier();
if(!singletonPostfixMap.containsKey(id)) {
String sPostfix = "singleton_" + (postfixCounter++);
singletonPostfixMap.put(id, sPostfix);
}
}
if(exec instanceof IInstanceExecutable) {
if(exec instanceof IInstanceGeneratorExtension) {
if(!instancePostfixMap.containsKey(exec)) {
String iPostfix = "instance_" + (postfixCounter++);
instancePostfixMap.put(exec, iPostfix);
......
BrickGeneratorExtensionBase.java 01442772f80ebf32eaf0507495a4380d0de034b1 YELLOW
LaserRangeSensorGeneratorExtension.java ff0c1e5e96a69b7deb6d7675e40f18510a36e7a0 YELLOW
UltraSonicSensorGeneratorExtension.java cbd4555e28600ce8f47c737330adfc9b5581bae8 YELLOW
......@@ -13,22 +13,21 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable.brick;
package org.fortiss.af3.platform.raspberry.generator.extension.brick;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.platform.language.executable.ExecutableBase;
import org.fortiss.af3.platform.raspberry.generator.executable.framework.ISingletonInitializationExecutable;
import org.fortiss.af3.platform.raspberry.generator.executable.library.BrickLibraryExecutableBase;
import org.fortiss.af3.platform.raspberry.generator.extension.library.BrickLibraryGeneratorExtensionBase;
import org.fortiss.af3.platform.raspberry.generator.framework.ISingletonInitializationGeneratorExtension;
/**
* Base class for {@link ExecutableBase executables} for the Brick and Bricklets hardware.
* Base class for generator extensions of the Brick and Bricklets hardware.
*
* @author hoelzl
*/
abstract class BrickExecutableBase<T extends EObject> extends BrickLibraryExecutableBase<T>
implements ISingletonInitializationExecutable {
abstract class BrickGeneratorExtensionBase<T extends EObject> extends
BrickLibraryGeneratorExtensionBase<T> implements ISingletonInitializationGeneratorExtension {
/** Constructor. */
public BrickExecutableBase(T modelElement) {
public BrickGeneratorExtensionBase(T modelElement) {
super(modelElement);
}
......
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