diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.classpath b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.classpath deleted file mode 100644 index 6046c7a0d1baa6d3897c2eef516aa6ba0e45df00..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="build"/> -</classpath> diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.project b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.project deleted file mode 100644 index b36b3e2e7417ec9ac8b2fd38ffd69f69b705b316..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.fortiss.af3.platform.raspberry.ui</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/META-INF/MANIFEST.MF deleted file mode 100644 index f68305a2aeb4a5efeafbfb0e3b0a87fb57c5ef99..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Fortiss AF3 Platform Raspberry UI -Bundle-SymbolicName: org.fortiss.af3.platform.raspberry.ui;singleton:=true -Bundle-Version: 2.9.0.qualifier -Bundle-Activator: org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator -Require-Bundle: org.eclipse.ui.ide;bundle-version="3.7.0";visibility:=reexport, - org.fortiss.af3.project.ui;bundle-version="1.0.0";visibility:=reexport, - org.fortiss.tooling.base.ui;bundle-version="1.0.0";visibility:=reexport, - org.fortiss.af3.platform.ui, - org.fortiss.af3.platform.raspberry;bundle-version="2.9.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-Vendor: fortiss GmbH -Export-Package: org.fortiss.af3.platform.raspberry.ui -Import-Package: org.fortiss.af3.platform.compose, - org.fortiss.af3.platform.compose.base.hierarchical, - org.fortiss.af3.platform.compose.base.hierarchical.elements, - org.fortiss.af3.platform.model, - org.fortiss.af3.platform.utils diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/build.properties b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/build.properties deleted file mode 100644 index c514c7fdb6b707a3347714699fddcf5ceecb5028..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -# <copyright> -# </copyright> -# -# $Id$ - -bin.includes = .,\ - META-INF/,\ - plugin.xml -source.. = src/ -output.. = build/ \ No newline at end of file diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logo.jpeg b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logo.jpeg deleted file mode 100644 index 204934bddfafd5893e71673c16251929914a6045..0000000000000000000000000000000000000000 Binary files a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logo.jpeg and /dev/null differ diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logoBIG.jpeg b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logoBIG.jpeg deleted file mode 100644 index c2be90bc4a910a5e6b459905286c5fcbe4edbd4c..0000000000000000000000000000000000000000 Binary files a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/can-logoBIG.jpeg and /dev/null differ diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logo.png b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logo.png deleted file mode 100644 index ca054922c08baf0bb3235fb02d1baafcc9722419..0000000000000000000000000000000000000000 Binary files a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logo.png and /dev/null differ diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logoBIG.png b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logoBIG.png deleted file mode 100644 index faa554e617fb40bb60ab411dbcb13a9db8f88d0b..0000000000000000000000000000000000000000 Binary files a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/icons/raspberry-pi-logoBIG.png and /dev/null differ diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.properties b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.properties deleted file mode 100644 index 35dca873d642ed94938bbbf54744d1cbf042ebe5..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# <copyright> -# </copyright> -# -# $Id$ - -pluginName = Fortiss AF3 Base Project UI -providerName = fortiss GmbH diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.xml b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.xml deleted file mode 100644 index 130e9d8e99a9a0ba08bb03f119d0880ea15d7c30..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/plugin.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> - -<!-- - <copyright> - </copyright> - - $Id$ ---> -<plugin> -<extension - point="org.fortiss.tooling.kernel.modelPrototypeProvider"> - <modelPrototypeProvider - provider="org.fortiss.af3.platform.raspberry.ui.prototype.ProtoypeProvider"> - </modelPrototypeProvider> - </extension> -<extension - point="org.fortiss.tooling.kernel.ui.modelElementHandler"> - <modelElementHandler - handler="org.fortiss.af3.platform.raspberry.ui.handler.RaspberryPiHandler"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> - </modelElementClass> - </modelElementHandler> - <modelElementHandler - handler="org.fortiss.af3.platform.raspberry.ui.handler.CanBusHandler"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanBus"> - </modelElementClass> - </modelElementHandler> - <modelElementHandler - handler="org.fortiss.af3.platform.raspberry.ui.handler.CanConnectorHandler"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - </modelElementHandler> -</extension> -<extension - point="org.fortiss.tooling.kernel.ui.editPartFactory"> - <editPartFactory - factory="org.fortiss.af3.platform.raspberry.ui.editpart.EditPartFactory"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanBus"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.SensorConnector"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.ActuatorConnector"> - </modelElementClass> - </editPartFactory> -</extension> -</plugin> diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/pom.xml b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/pom.xml deleted file mode 100644 index 924914f316a0b8fc05f6754a843460bb65493a6b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - $Id$ - @version $Rev$ - @ConQAT.Rating RED Hash: E1674C4A6DD3CBC4A7B7E85232D9695F ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.fortiss.af3</groupId> - <artifactId>org.fortiss.af3.platform.raspberry.ui</artifactId> - <packaging>eclipse-plugin</packaging> - - <parent> - <groupId>org.fortiss.std.pom</groupId> - <artifactId>std-parent-pom-indigo</artifactId> - <version>1.0</version> - <relativePath>../fortiss-std-env/maven-build/pom.xml</relativePath> - </parent> - - <version>2.9.0-SNAPSHOT</version> -</project> \ No newline at end of file diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/AF3PlatformRaspberryUIActivator.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/AF3PlatformRaspberryUIActivator.java deleted file mode 100644 index e65c3d2765864a3756835ff775660cc1bb6d3ab8..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/AF3PlatformRaspberryUIActivator.java +++ /dev/null @@ -1,68 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2011 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.ui; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle. - * - * @author hoelzl - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: 250D9EED7E36588B51D8F1B3F968B2FB - */ -public class AF3PlatformRaspberryUIActivator extends AbstractUIPlugin { - - /** The plug-in ID. */ - public static final String PLUGIN_ID = AF3PlatformRaspberryUIActivator.class.getPackage().getName(); //$NON-NLS-1$ - - /** The shared instance. */ - private static AF3PlatformRaspberryUIActivator plugin; - - /** Constructor. */ - public AF3PlatformRaspberryUIActivator() { - // do nothing - } - - /** {@inheritDoc} */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /** {@inheritDoc} */ - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** Returns the shared instance. */ - public static AF3PlatformRaspberryUIActivator getDefault() { - return plugin; - } - - /** Returns the image descriptor for the given icon file. */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/editpart/EditPartFactory.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/editpart/EditPartFactory.java deleted file mode 100644 index ccfec9d6d2f1aca82d273295fd174259eadb3482..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/editpart/EditPartFactory.java +++ /dev/null @@ -1,68 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.ui.editpart; - -import org.eclipse.gef.EditPart; -import org.eclipse.swt.graphics.Color; -import org.fortiss.af3.platform.model.PlatformConnectorUnit; -import org.fortiss.af3.platform.raspberry.model.ActuatorConnector; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.af3.platform.raspberry.model.SensorConnector; -import org.fortiss.af3.platform.ui.DefaultStyle; -import org.fortiss.af3.platform.ui.editpart.generic.ExecutionUnitEditPart; -import org.fortiss.af3.platform.ui.editpart.generic.StickyPlatformConnectorUnitEditPart; -import org.fortiss.af3.platform.ui.editpart.generic.TransmissionUnitDefaultEditPart; -import org.fortiss.tooling.kernel.ui.extension.IEditPartFactory; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class EditPartFactory implements IEditPartFactory { - - /** {@inheritDoc} */ - @Override - public EditPart createEditPart(EditPart context, Object model) { - if(model instanceof RaspberryPi) { - return new ExecutionUnitEditPart((RaspberryPi)model) { - /** {@inheritDoc} */ - @Override - protected Color getBackgroundColor() { - return DefaultStyle.EU_BACKGROUND; - } - - /** {@inheritDoc} */ - @Override - protected Color getForegroundColor() { - return DefaultStyle.EU_FOREGROUND; - } - }; - } else if(model instanceof CanBus) { - return new TransmissionUnitDefaultEditPart((CanBus)model); - } else if(model instanceof CanConnector || model instanceof SensorConnector || - model instanceof ActuatorConnector) { - return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model); - } - return null; - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java deleted file mode 100644 index 80896163253a640110905b5f14d95a1e0377a4fd..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.ui.handler; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; -import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler; -import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase; - -/** - * {@link IModelElementHandler} for {@link CanBus}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -@SuppressWarnings({"unchecked", "rawtypes"}) -public class CanBusHandler extends ModelElementHandlerBase<CanBus> { - /** {@inheritDoc} */ - @Override - public String getName(CanBus element) { - String name = element.getName(); - return name != null ? name : "CanBus"; - } - - /** {@inheritDoc} */ - @Override - public ImageDescriptor getIconImageDescriptor() { - return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/can-logo.jpeg"); - } - - /** {@inheritDoc} */ - @Override - public List<EObject> getConnectors(CanBus element) { - return (List)element.getConnectors(); - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanConnectorHandler.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanConnectorHandler.java deleted file mode 100644 index d3a100a40ed6980ee21563323a7dc7383a520c47..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/CanConnectorHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.ui.handler; - -import static org.fortiss.af3.platform.ui.AF3PlatformUIActivator.getImageDescriptor; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler; -import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase; - -/** - * {@link IModelElementHandler} for {@link CanConnector}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanConnectorHandler extends ModelElementHandlerBase<CanConnector> { - /** {@inheritDoc} */ - @Override - public ImageDescriptor getIconImageDescriptor() { - return getImageDescriptor("icons/unknown.png"); - } - - /** {@inheritDoc} */ - @Override - public String getName(CanConnector element) { - String name = element.getName(); - return name != null ? name : "CanConnector"; - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java deleted file mode 100644 index b56bcee3cb7fd311b455267551cd06e9eb4c05c5..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.ui.handler; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; -import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler; -import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase; - -/** - * {@link IModelElementHandler} for {@link RaspberryPi}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -@SuppressWarnings({"unchecked", "rawtypes"}) -public class RaspberryPiHandler extends ModelElementHandlerBase<RaspberryPi> { - /** {@inheritDoc} */ - @Override - public String getName(RaspberryPi element) { - final String name = element.getName(); - return name != null ? name : "RaspberryPi"; - } - - /** {@inheritDoc} */ - @Override - public ImageDescriptor getIconImageDescriptor() { - return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/raspberry-pi-logo.png"); - } - - /** {@inheritDoc} */ - @Override - public List<EObject> getConnectors(RaspberryPi element) { - return (List)element.getConnectors(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java b/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java deleted file mode 100644 index 448ebb2f3099aaef5b068e9d9ce91cbe5e03b83d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java +++ /dev/null @@ -1,181 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.ui.prototype; - -import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT; -import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH; -import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.setConnectorPosition; -import static org.fortiss.tooling.base.utils.LayoutDataUtils.setNodeBounds; -import static org.fortiss.tooling.base.utils.LayoutDataUtils.setNodePosition; -import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createRectangle; - -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.RaspberryPi; -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.WheelEncoder; -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.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.af3.platform.raspberry.util.RaspberryModelElementFactory; -import org.fortiss.tooling.kernel.extension.base.PrototypeProviderBase; -import org.fortiss.tooling.kernel.extension.data.PrototypeCategory; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ProtoypeProvider extends PrototypeProviderBase { - - /** Stores the category to display for these prototypes. */ - protected final static String CATEGORY_NAME = "RaspberryPI Platform"; - /** Category for gamepad elements. */ - protected final static String GAMEPAD = "Gamepad"; - - /** {@inheritDoc} */ - @Override - protected void registerPrototypes() { - RaspberryPi pi = RaspberryModelElementFactory.createRaspberryPi(); - registerPrimaryPrototype("RaspberryPi", pi, CATEGORY_NAME); - PrototypeCategory prototypeCategory = registerPrototypeCategory(CATEGORY_NAME); - registerPrototypeCategory(prototypeCategory, GAMEPAD); - - CanBus bus = RaspberryModelElementFactory.createCanBus(); - setNodeBounds(bus, - createRectangle(0, 0, DEFAULT_SHAPE_MINIMUM_WIDTH, DEFAULT_SHAPE_MINIMUM_HEIGHT)); - registerPrototype("CanBus", bus, CATEGORY_NAME); - - CanConnector con = RaspberryModelElementFactory.createCanConnector(); - setNodePosition(con, 0, 0); - setConnectorPosition(con, 0, 0); - registerPrototype("CanConnector", con, CATEGORY_NAME); - - SensorIMU imu = RaspberryModelElementFactory.createSensorIMU(); - setNodePosition(imu, 0, 0); - setConnectorPosition(imu, 0, 0); - registerPrototype("IMU_Sensor", imu, CATEGORY_NAME); - - SensorLaserRangeFinder slrf = RaspberryModelElementFactory.createSensorLaserRangeFinder(); - setNodePosition(slrf, 0, 0); - setConnectorPosition(slrf, 0, 0); - registerPrototype("LaserRangeFinder_Sensor", slrf, CATEGORY_NAME); - - SensorLaserScanner sls = RaspberryModelElementFactory.createSensorLaserScanner(); - setNodePosition(sls, 0, 0); - setConnectorPosition(sls, 0, 0); - registerPrototype("LaserScanner_Sensor", sls, CATEGORY_NAME); - - ActuatorPWM pwm = RaspberryModelElementFactory.createActuatorPWM(); - setNodePosition(pwm, 0, 0); - setConnectorPosition(pwm, 0, 0); - registerPrototype("PWM_Actuator", pwm, CATEGORY_NAME); - - GPI gpi = RaspberryModelElementFactory.createGPI(); - setNodePosition(gpi, 0, 0); - setConnectorPosition(gpi, 0, 0); - registerPrototype("GPI", gpi, CATEGORY_NAME); - - GPO gpo = RaspberryModelElementFactory.createGPO(); - setNodePosition(gpo, 0, 0); - setConnectorPosition(gpo, 0, 0); - registerPrototype("GPO", gpo, CATEGORY_NAME); - - WheelEncoder wEncoder = RaspberryModelElementFactory.createWheelEncoder(); - setNodePosition(wEncoder, 0, 0); - setConnectorPosition(wEncoder, 0, 0); - registerPrototype("WheelEncoder", wEncoder, CATEGORY_NAME); - - Button1 button1 = RaspberryModelElementFactory.createButton1(); - setNodePosition(button1, 0, 0); - setConnectorPosition(button1, 0, 0); - registerPrototype(button1.getName(), button1, GAMEPAD); - - Button2 button2 = RaspberryModelElementFactory.createButton2(); - setNodePosition(button2, 0, 0); - setConnectorPosition(button2, 0, 0); - registerPrototype(button2.getName(), button2, GAMEPAD); - - Button3 button3 = RaspberryModelElementFactory.createButton3(); - setNodePosition(button3, 0, 0); - setConnectorPosition(button3, 0, 0); - registerPrototype(button3.getName(), button3, GAMEPAD); - - Button4 button4 = RaspberryModelElementFactory.createButton4(); - setNodePosition(button4, 0, 0); - setConnectorPosition(button4, 0, 0); - registerPrototype(button4.getName(), button4, GAMEPAD); - - ButtonL1 buttonL1 = RaspberryModelElementFactory.createButtonL1(); - setNodePosition(buttonL1, 0, 0); - setConnectorPosition(buttonL1, 0, 0); - registerPrototype(buttonL1.getName(), buttonL1, GAMEPAD); - - ButtonL2 buttonL2 = RaspberryModelElementFactory.createButtonL2(); - setNodePosition(buttonL2, 0, 0); - setConnectorPosition(buttonL2, 0, 0); - registerPrototype(buttonL2.getName(), buttonL2, GAMEPAD); - - ButtonR1 buttonR1 = RaspberryModelElementFactory.createButtonR1(); - setNodePosition(buttonR1, 0, 0); - setConnectorPosition(buttonR1, 0, 0); - registerPrototype(buttonR1.getName(), buttonR1, GAMEPAD); - - ButtonR2 buttonR2 = RaspberryModelElementFactory.createButtonR2(); - setNodePosition(buttonR2, 0, 0); - setConnectorPosition(buttonR2, 0, 0); - registerPrototype(buttonR2.getName(), buttonR2, GAMEPAD); - - Left_StickX_Position Left_StickX = RaspberryModelElementFactory.createLeftStickX(); - setNodePosition(Left_StickX, 0, 0); - setConnectorPosition(Left_StickX, 0, 0); - registerPrototype(Left_StickX.getName(), Left_StickX, GAMEPAD); - - Left_StickY_Position Left_StickY = RaspberryModelElementFactory.createLeftStickY(); - setNodePosition(Left_StickY, 0, 0); - setConnectorPosition(Left_StickY, 0, 0); - registerPrototype(Left_StickY.getName(), Left_StickY, GAMEPAD); - - Right_StickX_Position Right_StickX = RaspberryModelElementFactory.createRightStickX(); - setNodePosition(Right_StickX, 0, 0); - setConnectorPosition(Right_StickX, 0, 0); - registerPrototype(Right_StickX.getName(), Right_StickX, GAMEPAD); - - Right_StickY_Position Right_StickY = RaspberryModelElementFactory.createRightStickY(); - setNodePosition(Right_StickY, 0, 0); - setConnectorPosition(Right_StickY, 0, 0); - registerPrototype(Right_StickY.getName(), Right_StickY, GAMEPAD); - - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.classpath b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.classpath deleted file mode 100644 index f440d5cd4faa53f89f889d9f1fe9b4f8dee3887b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.classpath +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="generated-src"/> - <classpathentry kind="output" path="build"/> -</classpath> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.project b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.project deleted file mode 100644 index 896d6e89ebd3818e9800323a324521c35c795ec0..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/.project +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.fortiss.af3.platform.raspberry</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.fortiss.ide.dev_tools.emf.builder.EcoreBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.fortiss.ide.dev_tools.warnings.RemoveWarningsBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/META-INF/MANIFEST.MF deleted file mode 100644 index 0b3651d76875de8e690ebd182c603aceebb010ee..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/META-INF/MANIFEST.MF +++ /dev/null @@ -1,29 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Fortiss AF3 Platform Raspberry -Bundle-SymbolicName: org.fortiss.af3.platform.raspberry;singleton:=true -Bundle-Version: 2.9.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: fortiss GmbH -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.fortiss.af3.platform.raspberry.model, - org.fortiss.af3.platform.raspberry.model.gamepad, - org.fortiss.af3.platform.raspberry.model.gamepad.impl, - org.fortiss.af3.platform.raspberry.model.gamepad.util, - org.fortiss.af3.platform.raspberry.model.impl, - org.fortiss.af3.platform.raspberry.model.util, - org.fortiss.af3.platform.raspberry.util -Bundle-ActivationPolicy: lazy -Bundle-Activator: org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator -Require-Bundle: org.fortiss.af3.project, - org.fortiss.tooling.kernel;visibility:=reexport, - org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.fortiss.tooling.base;visibility:=reexport, - org.fortiss.af3.platform;bundle-version="2.5.0";visibility:=reexport, - org.fortiss.tooling.base.ui;bundle-version="2.11.0", - org.fortiss.af3.generator.common -Import-Package: org.fortiss.af3.deployment.generator, - org.fortiss.af3.platform.model - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/buckminster.cspex b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/buckminster.cspex deleted file mode 100644 index 6f45c454a375031aec5715da859265d0dca01498..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/buckminster.cspex +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<cspecExtension - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" - xmlns="http://www.eclipse.org/buckminster/CSpec-1.0"> - <actions> - <!-- Place your Actions here --> - <public name="generate-ecore" actor="jdt.ant" always="true"> - <actorProperties> - <property key="buildFile" value="model/generate-ecore.xml" /> - <property key="targets" value="generate-ecore"/> - </actorProperties> - <products> - <path path="generated-src" /> - </products> - </public> - </actions> - <alterGroups> - <!-- Place your Group alterations here --> - <public name="eclipse.build.source"> - <attribute name="generate-ecore"/> - </public> - </alterGroups> -</cspecExtension> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/build.properties b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/build.properties deleted file mode 100644 index f47685fe571e2e427dffe76721146ae93f786191..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/build.properties +++ /dev/null @@ -1,13 +0,0 @@ -# <copyright> -# </copyright> -# -# $Id$ - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -source.. = src/,\ - generated-src/ -output.. = build/ diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/Makedefs b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/Makedefs deleted file mode 100644 index 30b33f53e6879dfb3c901b93552a261b7bd41bb1..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/Makedefs +++ /dev/null @@ -1,47 +0,0 @@ -# The default application name. -ifndef APPL - APPL=my_app -endif - -# The default build path. -ifndef BPATH - BPATH=build -endif - -# The compiler. -ifndef CROSSCC - CROSSCC=gcc -endif - -# The linker. -ifndef CROSSLD - CROSSLD=gcc -endif - -# The flags which are passed to the compiler and the linker. -CCFLAGS+=-std=gnu99 -Wall -pthread -lwiringPi -pedantic -c ${patsubst %,-I%,${subst :, ,${IPATH}}} -LDFLAGS+=-std=gnu99 -Wall -pthread -lpthread -lwiringPi -pedantic - -# The default rules, i.e. the entry point. -all: ${BPATH} -all: ${BPATH}/${APPL}.run - -# The target to clean the build directory. -clean: - @echo "cleaning up path '${BPATH}' ..." - @rm -rf ${BPATH} - -# The rule for creating the build directory. -${BPATH}: - @echo "creating path '${BPATH}' ..." - @mkdir ${BPATH} - -# The rule for building an object file from the corresponding C source file. -${BPATH}/%.o: %.c - @echo "compiling file '${<}' ..." - @${CROSSCC} ${CCFLAGS} -o ${@} ${<} - -# The rule for linking an application. -${BPATH}/%.run: - @echo "linking application '${@}' ..." - @${CROSSLD} ${LDFLAGS} -o ${@} $(filter %.o %.a, ${^}) \ No newline at end of file diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc-gen/data_dictionary.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc-gen/data_dictionary.h deleted file mode 100644 index b9570e1140355919215e9813bb997b102ddc9899..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc-gen/data_dictionary.h +++ /dev/null @@ -1,55 +0,0 @@ -/* generated by AutoFOCUS 3 (2.11.0) on Tue May 16 17:42:09 CEST 2017 */ -#ifndef __HEADER_data_dictionary_h -#define __HEADER_data_dictionary_h -#if defined(__cplusplus) -typedef bool GEN_TYPE_boolean; -#else -typedef enum Enum_TYPE_boolean { - false = 0, true = 1 -} GEN_TYPE_boolean; -#endif - -typedef int GEN_TYPE_int; - -typedef double GEN_TYPE_double; - -/*extern GEN_TYPE_double abs(GEN_TYPE_double _V); - -extern GEN_TYPE_double arctan(GEN_TYPE_double _V); - -extern GEN_TYPE_double cos(GEN_TYPE_double _V); - -extern GEN_TYPE_double cot(GEN_TYPE_double _V); - -extern GEN_TYPE_double e(); - -extern GEN_TYPE_double exp(GEN_TYPE_double _V); - -extern GEN_TYPE_double ln(GEN_TYPE_double _V); - -extern GEN_TYPE_double pi(); - -extern GEN_TYPE_double sgn(GEN_TYPE_double _V); - -extern GEN_TYPE_double sin(GEN_TYPE_double _V); - -extern GEN_TYPE_double sqrt(GEN_TYPE_double _V); - -extern GEN_TYPE_double tan(GEN_TYPE_double _V); - -extern GEN_TYPE_double _sqrt(GEN_TYPE_double _X,GEN_TYPE_double _V); - -extern GEN_TYPE_double pow(GEN_TYPE_double _V,GEN_TYPE_double _N); - -extern GEN_TYPE_double factorial(GEN_TYPE_double _V); - -extern GEN_TYPE_double min(GEN_TYPE_double _a,GEN_TYPE_double _b); - -extern GEN_TYPE_double max(GEN_TYPE_double _a,GEN_TYPE_double _b); - -extern GEN_TYPE_double rad2deg(GEN_TYPE_double _A); - -extern GEN_TYPE_double deg2rad(GEN_TYPE_double _A);*/ - -#endif // __HEADER_data_dictionary_h - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/CanConnector.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/CanConnector.h deleted file mode 100644 index a75fa33e0743b97dc0581d91843497031ab8ef63..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/CanConnector.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __CANCONNECTOR_H -#define __CANCONNECTOR_H - -#include <stdio.h> - -#include "inc/libcansocket.h" -#include "inc-gen/data_dictionary.h" - -// types -typedef const char* CAN_MSG_T; -typedef unsigned long CAN_CLK_T; - -// constants -extern const char* CAN_DEVICE_NAME; - -// send and receive -void can_send(); -void can_send_clock(CAN_CLK_T counter); -void can_receive(); -CAN_CLK_T can_receive_clock(); - -// init, terminate, prepare -void can_init(); -void can_term(); - -void prepare_input_CanConnector(); -void finish_input_CanConnector(); - -void prepare_output_CanConnector(); -void finish_output_CanConnector(); - -// noval -GEN_TYPE_boolean can_is_noval(CAN_MSG_T msg); -GEN_TYPE_boolean can_set_noval(CAN_MSG_T msg); - -// readers -GEN_TYPE_boolean can_read_bool(CAN_MSG_T msg); -GEN_TYPE_double can_read_double(CAN_MSG_T msg); -GEN_TYPE_int can_read_int(CAN_MSG_T pomsgrt); - -// writers -void can_write_bool(CAN_MSG_T msg, GEN_TYPE_boolean value); -void can_write_double(CAN_MSG_T msg, GEN_TYPE_double value); -void can_write_int(CAN_MSG_T msg, GEN_TYPE_int value); - -#endif // __CANCONNECTOR_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/GPIO.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/GPIO.h deleted file mode 100644 index b725758a005747a1bf4f55705a51edf34f1ac46e..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/GPIO.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __GPIO_H -#define __GPIO_H - -#include <stdio.h> -#include <wiringPi.h> -#include "inc-gen/data_dictionary.h" - -// types -typedef int GPIO_PIN_T; - -// init, term -void gpio_init(GPIO_PIN_T pin); -void gpio_init_in(GPIO_PIN_T pin); -void gpio_init_out(GPIO_PIN_T pin); -void gpio_term(GPIO_PIN_T pin); - -// noval -GEN_TYPE_boolean gpio_is_noval(GPIO_PIN_T pin); -void gpio_set_noval(GPIO_PIN_T pin); - -// readers -GEN_TYPE_boolean gpio_read(GPIO_PIN_T pin); - -// writers -void gpio_write(GPIO_PIN_T pin, GEN_TYPE_boolean value); - -#endif // __GPIO_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/Gamepad.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/Gamepad.h deleted file mode 100644 index 0e818c4df747e47ea06f9fea9c5636bf67d04d55..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/Gamepad.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef __GAMEPAD_H -#define __GAMEPAD_H - -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> -#include <fcntl.h> -#include <unistd.h> - -#include "inc-gen/data_dictionary.h" - -// constants -#define JS_EVENT_BUTTON 0x01 -#define JS_EVENT_AXIS 0x02 -#define JS_EVENT_INIT 0x80 - -extern const char* GP_DEVICE_NAME; - -// types etc -union input_events { - struct input_btns { - int16_t js1_lr; // LX - int16_t js1_ud; // LY - int16_t js2_lr; // RX - int16_t js2_ud; // RY - int16_t gp_lr; // GPX - int16_t gp_ud; // GPY - int16_t bt_tri; // BTN1 - int16_t bt_cir; // BTN2 - int16_t bt_x; // BTN3 - int16_t bt_sqr; // BTN4 - int16_t bt_l1; // L1 - int16_t bt_r1; // R1 - int16_t bt_l2; // L2 - int16_t bt_r2; // R2 - int16_t bt_sel; // SELECT - int16_t bt_strt;// START - int16_t js1_bt; // LCLICK - int16_t js2_bt; // RCLICK - } btns; - int16_t inps[18]; -}; - -struct js_event { - uint32_t time; // event time stamp in millisecons - int16_t value; // value - uint8_t type; // event type - uint8_t number; // axis/button number -}; - -extern volatile union input_events ie; - -// worker -void* gp_worker(void* pt_args); - -// init, term -void gp_init(); -void gp_term(); - -// readers -GEN_TYPE_boolean gp_btn1_read(); -GEN_TYPE_boolean gp_btn2_read(); -GEN_TYPE_boolean gp_btn3_read(); -GEN_TYPE_boolean gp_btn4_read(); -GEN_TYPE_boolean gp_btnL1_read(); -GEN_TYPE_boolean gp_btnL2_read(); -GEN_TYPE_boolean gp_btnR1_read(); -GEN_TYPE_boolean gp_btnR2_read(); -GEN_TYPE_double gp_btnLX_read(); -GEN_TYPE_double gp_btnLY_read(); -GEN_TYPE_double gp_btnRX_read(); -GEN_TYPE_double gp_btnRY_read(); - -// noval -GEN_TYPE_boolean gp_btn1_is_noval(); -GEN_TYPE_boolean gp_btn2_is_noval(); -GEN_TYPE_boolean gp_btn3_is_noval(); -GEN_TYPE_boolean gp_btn4_is_noval(); -GEN_TYPE_boolean gp_btnL1_is_noval(); -GEN_TYPE_boolean gp_btnL2_is_noval(); -GEN_TYPE_boolean gp_btnR1_is_noval(); -GEN_TYPE_boolean gp_btnR2_is_noval(); -GEN_TYPE_boolean gp_btnLX_is_noval(); -GEN_TYPE_boolean gp_btnLY_is_noval(); -GEN_TYPE_boolean gp_btnRX_is_noval(); -GEN_TYPE_boolean gp_btnRY_is_noval(); - -#endif // __GAMEPAD_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/IMU.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/IMU.h deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/LaserRangeFinder.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/LaserRangeFinder.h deleted file mode 100644 index 75cab869e37abf5e33b9a9ee2b1b6e53dc0a1d5d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/LaserRangeFinder.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __LASERRANGEFINDER_H -#define __LASERRANGEFINDER_H - -#include <stdlib.h> - -#include "inc-gen/data_dictionary.h" -#include "inc/libuart.h" - -// constants -const char* LRF_DEVICE_NAME; - -// init, terminate -void lrf_init(); -void lrf_term(); - -// getters -GEN_TYPE_boolean lrf_is_noval(); -GEN_TYPE_int lrf_read(); - -#endif // __LASERRANGEFINDER_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/LaserScanner.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/LaserScanner.h deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/PWM.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/PWM.h deleted file mode 100644 index 8b72ff55c3c088674d84053c0a64b5e6fdfafdf2..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/PWM.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __PWM_H -#define __PWM_H - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <termios.h> -#include <fcntl.h> -#include <sys/stat.h> - -#include "inc-gen/data_dictionary.h" -#include "inc/libmaestro.h" - -// macros -// 6072 is the value for 0, max. value to motor is currently 7572 -// from AF3 you get a max. speed value in mm/s : 1471 -// Hence, add the constant 6072 and map values -1471-1471 to -1500-1500 -#define PWM_ADJUST_VALUE(x) (6072 + 1500 * x /1471) - -// types -typedef unsigned char PWM_CHANNEL_T; - -// constants -extern const int PWM_SLEEP_TIME; -extern const char* PWM_DEVICE_NAME; -extern const size_t PWM_MAX_NO_CHANNELS; - -// worker -void* pwm_worker(void* pt_args); - -// init, term -void pwm_init(PWM_CHANNEL_T channel); -void pwm_term(PWM_CHANNEL_T channel); - -// writers -void pwm_write(PWM_CHANNEL_T channel, GEN_TYPE_int value); -void pwm_set_noval(PWM_CHANNEL_T channel); - -#endif // __PWM_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/io.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/io.h deleted file mode 100644 index 12856441b6b1fd8ce25e71d700b7f775b6b2fd15..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/io.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __IO_H -#define __IO_H - -#include "inc-gen/data_dictionary.h" - -// init, terminate -void init_left_stick(); -void term_left_stick(); - -void init_right_stick(); -void term_right_stick(); - -// NOVAL -GEN_TYPE_boolean is_noval_left_stick(); -GEN_TYPE_boolean is_noval_right_stick(); - -// readers -GEN_TYPE_double read_left_stick(); -GEN_TYPE_double read_right_stick(); - -// writers -void write_left_stick(GEN_TYPE_double value); -void write_right_stick(GEN_TYPE_double value); - -#endif // __IO_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libcansocket.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libcansocket.h deleted file mode 100644 index a791bad054014c1e9057e1589a2d1bd093dbf3b2..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libcansocket.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __LIBCANSOCKET_H -#define __LIBCANSOCKET_H - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include <net/if.h> -#include <sys/ioctl.h> - -#include <linux/can.h> -#include <linux/can/raw.h> - -#define SR_ERR -1 - -struct can_socket { - int s; - struct sockaddr_can addr; - struct ifreq ifr; -}; - -/** - * Opens a can socket on the given interface - */ -struct can_socket* can_socket_open(const char *if_name); - -/** - * Closes a given socket - */ -void can_socket_close(struct can_socket* sock); - -/** - * Sends a can frame on the specified socket - */ -ssize_t can_socket_send(struct can_socket* sock, struct can_frame* frame); - -/** - * - */ -ssize_t can_socket_receive(struct can_socket* sock, struct can_frame* frame); - -#endif // __LIBCANSOCKET_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libmaestro.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libmaestro.h deleted file mode 100644 index 22f83e053bbf26e8807b8013718a6a1f0b9c222d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libmaestro.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __LIBMAESTRO_H -#define __LIBMAESTRO_H - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <termios.h> - -int maestroRead(int fd, unsigned char channel); -int maestroWrite(int fd, unsigned char channel, unsigned short target); - -#endif // __LIBMAESTRO_H diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libuart.h b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libuart.h deleted file mode 100644 index 2861d5aaeede19c7975f346cce01dc605be6a942..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/inc/libuart.h +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file uart.h - * @author Bianca Forkel - */ - -#ifndef MBSE_UART_H -#define MBSE_UART_H - -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <termios.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/select.h> - -extern int uart_filestream; - -char port[13]; - -int uart_setup(const char*); - -int uart_send_byte(char, int); - -int uart_send_string(char*, int, int); - -int uart_receive(char*, int, int); - -void uart_close(); - -void uart_flush(); - -#endif diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src-gen/data_dictionary.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src-gen/data_dictionary.c deleted file mode 100644 index 1d778b9d9233731c34a467fd764387b7f3de61e6..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src-gen/data_dictionary.c +++ /dev/null @@ -1,170 +0,0 @@ -/* generated by AutoFOCUS 3 (2.11.0) on Tue May 16 17:42:09 CEST 2017 */ -#include "inc-gen/data_dictionary.h" - -/*GEN_TYPE_double abs(GEN_TYPE_double _V){ - return _V * sgn(_V); -} - -GEN_TYPE_double arctan(GEN_TYPE_double _V){ - if (abs(_V) <= 1.0) { - return _V / (1 + (0.28 * _V) * _V); - } - else { - if (_V > 1) { - return pi() / 2.0 - _V / (_V * _V + 0.28); - } - else { - return -(pi() / 2.0) - _V / (_V * _V + 0.28); - } - } -} - -GEN_TYPE_double cos(GEN_TYPE_double _V){ - return sin((_V + pi() / 2.0)); -} - -GEN_TYPE_double cot(GEN_TYPE_double _V){ - return cos(_V) / sin(_V); -} - -GEN_TYPE_double e(){ - return 2.718281828459; -} - -GEN_TYPE_double exp(GEN_TYPE_double _V){ - return ((((1 + _V) + (_V * _V) / 2) + ((_V * _V) * _V) / 6) + (((_V * _V) * _V) * _V) / 24) + ((((_V * _V) * _V) * _V) * _V) / 120; -} - -GEN_TYPE_double ln(GEN_TYPE_double _V){ - if (_V <= 0) { - return 0; - } - else { - return ((((_V - 1.0) - ((_V - 1.0) * (_V - 1.0)) / 2.0) + (((_V - 1) * (_V - 1)) * (_V - 1)) / 3.0) - ((((_V - 1) * (_V - 1)) * (_V - 1)) * (_V - 1)) / 4.0) + (((((_V - 1) * (_V - 1)) * (_V - 1)) * (_V - 1)) * (_V - 1)) / 5.0; - } -} - -GEN_TYPE_double pi(){ - return 3.14159265; -} - -GEN_TYPE_double sgn(GEN_TYPE_double _V){ - if (_V < 0) { - return -1; - } - else { - if (_V == 0) { - return 0; - } - else { - return 1; - } - } -} - -GEN_TYPE_double sin(GEN_TYPE_double _V){ - if (_V % (2 * pi()) < 0) { - return -sin((-_V)); - } - else { - if (_V % (2 * pi()) > pi()) { - return -sin((_V % (2 * pi()) - pi())); - } - else { - if (_V % (2 * pi()) < 0) { - if (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())) < 0) { - return 0.225 * ((1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) * -(1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) - (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())))) + (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))); - } - else { - return 0.225 * ((1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) * (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) - (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())))) + (1.27323954 * (_V % (2 * pi())) + (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))); - } - } - else { - if (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())) < 0) { - return 0.225 * ((1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) * -(1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) - (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())))) + (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))); - } - else { - return 0.225 * ((1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) * (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))) - (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi())))) + (1.27323954 * (_V % (2 * pi())) - (0.405284735 * (_V % (2 * pi()))) * (_V % (2 * pi()))); - } - } - } - } -} - -GEN_TYPE_double sqrt(GEN_TYPE_double _V){ - if (_V <= 0) { - return 0; - } - else { - return _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, _sqrt(_V, ((_V + 1.0) / 2.0))))))))))); - } -} - -GEN_TYPE_double tan(GEN_TYPE_double _V){ - return sin(_V) / cos(_V); -} - -GEN_TYPE_double _sqrt(GEN_TYPE_double _X,GEN_TYPE_double _V){ - return 0.5 * (_V + _X / _V); -} - -GEN_TYPE_double pow(GEN_TYPE_double _V,GEN_TYPE_double _N){ - if (_N == 0) { - return 1; - } - else { - if (_N < 0) { - if (_V == 0) { - return 0; - } - else { - return 1.0 / pow(_V, (-_N)); - } - } - else { - if (_N == 1) { - return _V; - } - else { - return _V * pow(_V, (_N - 1)); - } - } - } -} - -GEN_TYPE_double factorial(GEN_TYPE_double _V){ - if (_V % 1 != 0) { - return factorial((_V - _V % 1)); - } - else { - if (_V == 0 || _V == 1) { - return 1; - } - else { - return factorial((_V - 1)) * _V; - } - } -} - -GEN_TYPE_double min(GEN_TYPE_double _a,GEN_TYPE_double _b){ - if (_a < _b) { - return _a; - } - return _b; -} - -GEN_TYPE_double max(GEN_TYPE_double _a,GEN_TYPE_double _b){ - if (_a > _b) { - return _a; - } - return _b; -} - -GEN_TYPE_double rad2deg(GEN_TYPE_double _A){ - return (_A / pi()) * 180.0; -} - -GEN_TYPE_double deg2rad(GEN_TYPE_double _A){ - return (_A / 180.0) * pi(); -}*/ - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/CanConnector.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/CanConnector.c deleted file mode 100644 index 196072d4b2921e8b197e0b7c6560d100041c4439..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/CanConnector.c +++ /dev/null @@ -1,84 +0,0 @@ - -#include "inc/CanConnector.h" - -// constants -const char* CAN_DEVICE_NAME = "can0"; - -// variables -struct can_socket* can_sock; - -// send and receive -void can_send() { - // TODO send and empty buffer -} - -void can_send_clock(CAN_CLK_T counter) { - // TODO send clock message with clock counter -} - -void can_receive() { - // TODO fill buffer -} - -CAN_CLK_T can_receive_clock() { - // TODO receive clock message and return clock counter -} - -// init, terminate -void can_init() { - printf("initializing CAN\n"); - - can_sock = can_socket_open(CAN_DEVICE_NAME); - - // TODO init buffers -} - -void can_term() { - printf("terminating CAN\n"); - - can_socket_close(can_sock); -} - -void prepare_input_CanConnector() {} - -void finish_input_CanConnector() {} - -void prepare_output_CanConnector() {} - -void finish_output_CanConnector() {} - -// noval -GEN_TYPE_boolean can_is_noval(CAN_MSG_T msg) { - return false; -} - -GEN_TYPE_boolean can_set_noval(CAN_MSG_T msg) { - return false; -} - -// readers -GEN_TYPE_boolean can_read_bool(CAN_MSG_T msg) { - return false; // TODO -} - -GEN_TYPE_double can_read_double(CAN_MSG_T msg) { - return 0.0; // TODO -} - -GEN_TYPE_int can_read_int(CAN_MSG_T msg) { - return 0; // TODO -} - -// writers -void can_write_bool(CAN_MSG_T msg, GEN_TYPE_boolean value) { - // TODO -} - -void can_write_double(CAN_MSG_T msg, GEN_TYPE_double value) { - // TODO -} - -void can_write_int(CAN_MSG_T msg, GEN_TYPE_int value) { - // TODO -} - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/GPIO.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/GPIO.c deleted file mode 100644 index 355932588b7fa1ae52cbd22965478b961988b4ea..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/GPIO.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "inc/GPIO.h" - -// init, term -GEN_TYPE_boolean gpio_initialized = false; -GEN_TYPE_boolean gpio_terminated = false; - -void gpio_init(GPIO_PIN_T pin) { - // important, since all pins are accessing the same method - if(gpio_initialized) return; - - if(wiringPiSetup() == -1) { - perror("cannot setup wiring pi\n"); - return; - } - - gpio_initialized = true; -} - -void gpio_init_in(GPIO_PIN_T pin) { - gpio_init(pin); - - pinMode(pin, INPUT); -} - -void gpio_init_out(GPIO_PIN_T pin) { - gpio_init(pin); - - pinMode(pin, OUTPUT); -} - -void gpio_term(GPIO_PIN_T pin) { - // important, since all pins are accessing the same method - if(gpio_terminated) return; - - gpio_terminated = false; -} - -// noval -GEN_TYPE_boolean gpio_is_noval(GPIO_PIN_T pin) { - return false; -} - -void gpio_set_noval(GPIO_PIN_T pin) { - // do nothing -} - -// readers -GEN_TYPE_boolean gpio_read(GPIO_PIN_T pin) { - return digitalRead(pin); -} - -// writers -void gpio_write(GPIO_PIN_T pin, GEN_TYPE_boolean value) { - digitalWrite(pin, value); -} - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/Gamepad.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/Gamepad.c deleted file mode 100644 index c3134d4fd907563640d0671ff7f02575cf86db72..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/Gamepad.c +++ /dev/null @@ -1,276 +0,0 @@ - -#include "inc/Gamepad.h" - -// constants -const char* GP_DEVICE_NAME = "/dev/input/js0"; - -// variables -volatile union input_events ie; // stores the button values - -// worker -GEN_TYPE_boolean gp_is_running = true; - -void* gp_worker(void* pt_args) { - int fd; - fd = open(GP_DEVICE_NAME, O_RDONLY); - - if(fd <= 0) { - perror("Error while connecting to gamepad device. Aborting"); - return NULL; - } - - struct timeval timeout; - struct js_event jse; - fd_set read_fds, write_fds, except_fds; - - // loop until terminated... - while(gp_is_running) { - FD_ZERO(&read_fds); - FD_ZERO(&write_fds); - FD_ZERO(&except_fds); - FD_SET(fd, &read_fds); - - timeout.tv_sec = 0; - timeout.tv_usec = 25000; - - if (select(fd + 1, &read_fds, &write_fds, &except_fds, &timeout) == 1) { - if(read(fd,&jse,sizeof(jse)) == sizeof(jse)) { - jse.type &= ~JS_EVENT_INIT; - - if(jse.type == JS_EVENT_AXIS) { - ie.inps[jse.number] = jse.value; - - #ifdef DEBUG - printf("Axis %d %d\n", jse.number, jse.value); - #endif // DEBUG - } - - if(jse.type == JS_EVENT_BUTTON) { - ie.inps[jse.number + 6] = jse.value; - - #ifdef DEBUG - printf("Button %d %d\n",jse.number, jse.value); - #endif // DEBUG - } - } - } - } - - close(fd); - - return NULL; -} - -// init, term -GEN_TYPE_boolean gp_initialized = false; -GEN_TYPE_boolean gp_terminated = false; - -void gp_init() { - // important, since all btns are accessing the same method - if(gp_initialized) return; - - // Initialize Joystick Inputs to 0 - ie.btns.js1_ud = 0; - ie.btns.js2_lr = 0; - ie.btns.js2_ud = 0; - - // Initialize Button inputs to NoVal - ie.btns.bt_tri = 2; - ie.btns.bt_cir = 2; - ie.btns.bt_x = 2; - ie.btns.bt_sqr = 2; - ie.btns.bt_l1 = 2; - ie.btns.bt_l2 = 2; - ie.btns.bt_r1 = 2; - ie.btns.bt_r2 = 2; - - gp_initialized = true; -} - -void gp_term() { - // important, since all btns are accessing the same method - if(gp_terminated) return; - - gp_terminated = false; - gp_is_running = false; -} - -// readers: Return button values (1 is true, 0 is false, 2 is NoVal) -// important: Reset button values to NoVal after reading -GEN_TYPE_boolean gp_btn1_read() { - if (ie.btns.bt_tri == 1) - { - ie.btns.bt_tri = 2; - return 1; - } - else - { - ie.btns.bt_tri = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btn2_read() { - if (ie.btns.bt_cir == 1) - { - ie.btns.bt_cir = 2; - return 1; - } - else - { - ie.btns.bt_cir = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btn3_read() { - if (ie.btns.bt_x == 1) - { - ie.btns.bt_x = 2; - return 1; - } - else - { - ie.btns.bt_x = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btn4_read() { - if (ie.btns.bt_sqr == 1) - { - ie.btns.bt_sqr = 2; - return 1; - } - else - { - ie.btns.bt_sqr = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btnL1_read() { - if (ie.btns.bt_l1 == 1) - { - ie.btns.bt_l1 = 2; - return 1; - } - else - { - ie.btns.bt_l1 = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btnL2_read() { - if (ie.btns.bt_l2 == 1) - { - ie.btns.bt_l2 = 2; - return 1; - } - else - { - ie.btns.bt_l2 = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btnR1_read() { - if (ie.btns.bt_r1 == 1) - { - ie.btns.bt_r1 = 2; - return 1; - } - else - { - ie.btns.bt_r1 = 2; - return 0; - } -} - -GEN_TYPE_boolean gp_btnR2_read() { - if (ie.btns.bt_r2 == 1) - { - ie.btns.bt_r2 = 2; - return 1; - } - else - { - ie.btns.bt_r2 = 2; - return 0; - } -} - -GEN_TYPE_double gp_btnLX_read() { - return ie.btns.js1_lr; -} - -GEN_TYPE_double gp_btnLY_read() { - return -ie.btns.js1_ud; -} - -GEN_TYPE_double gp_btnRX_read() { - return ie.btns.js2_lr; -} - -GEN_TYPE_double gp_btnRY_read() { - return -ie.btns.js2_ud; -} - -// noval -GEN_TYPE_boolean gp_btn1_is_noval() { - if (ie.btns.bt_tri == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btn2_is_noval() { - if (ie.btns.bt_cir == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btn3_is_noval() { - if (ie.btns.bt_x == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btn4_is_noval() { - if (ie.btns.bt_sqr == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btnL1_is_noval() { - if (ie.btns.bt_l1 == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btnL2_is_noval() { - if (ie.btns.bt_l2 == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btnR1_is_noval() { - if (ie.btns.bt_r1 == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btnR2_is_noval() { - if (ie.btns.bt_r2 == 2) return 1; - return 0; -} - -GEN_TYPE_boolean gp_btnLX_is_noval() { - return false; -} - -GEN_TYPE_boolean gp_btnLY_is_noval() { - return false; -} - -GEN_TYPE_boolean gp_btnRX_is_noval() { - return false; -} - -GEN_TYPE_boolean gp_btnRY_is_noval() { - return false; -} - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/IMU.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/IMU.c deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/LaserRangeFinder.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/LaserRangeFinder.c deleted file mode 100644 index 6a73d303e18436265147521fc067d1d95f63237c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/LaserRangeFinder.c +++ /dev/null @@ -1,102 +0,0 @@ - -#include "inc/LaserRangeFinder.h" - -int timeout; - -/** Initialize the laser range finder. */ -void lrf_init() { - timeout = 0; - - char port[100]; - FILE* fp = popen("ls -d /dev/serial/by-id/* | grep \"Arduino_Micro\" | tr -d \"\n\"", "r"); - fgets(port, sizeof(port), fp); - - - printf("lrf port=%s\n", port); - pclose(fp); - - uart_setup(port); -} - -/** Terminate the session. */ -void lrf_term() { - uart_close(); -} - -/** Checking for noVal. */ -GEN_TYPE_boolean lrf_is_noval() { - return false; -} - -/** Get one distance measurement from the laser range finder. */ -GEN_TYPE_int lrf_read() { - - if(timeout>1000) - lrf_init(); - - if (uart_filestream == -1) { - timeout++; - printf("-1: no filestream\n"); - return -1; - } - - //empty buffer - uart_flush(); - - //initialize arrays - int sizeB = 10; - int sizeV = 4; - - int i; - char bytes[sizeB]; - for (i = 0; i < sizeB; i++) { - bytes[i] = 0; - } - int n_read = 0; - - char value[sizeV]; - for (i = 0; i < sizeV; i++) { - value[i] = 0; - } - - int n = 0; - int d; - - //receive values - while (1) { - n_read = uart_receive(bytes, sizeB, 0); - - if(n_read <= 0) { - timeout++; - printf("-1: n_read=%d\n",n_read); - return -1; - } - - for (i = 0; i < n_read; i++) { - if (bytes[i] != 0xd && bytes[i] != 0xa) { - if(n < sizeV) - value[n++] = bytes[i]; - else { - timeout++; - printf("-1: too many bytes\n"); - return -1; - } - } else { - d = atoi(value); - if (d == 0) { - timeout++; - printf("-1: zero value\n"); - return -1; - } else if(d == 1061) { //strange behaviour of one lrf - printf("-1: 1061\n"); - return -1; - } - else { - printf("%d\n", d); - timeout = 0; - return d; - } - } - } - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/LaserScanner.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/LaserScanner.c deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/PWM.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/PWM.c deleted file mode 100644 index d50d6985252aeb07bfbafdba0ad67b5c811ab127..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/PWM.c +++ /dev/null @@ -1,87 +0,0 @@ -#include "inc/PWM.h" - -// constants -const int PWM_SLEEP_TIME = 50000; -const char* PWM_DEVICE_NAME = "/dev/ttyACM0"; -const size_t PWM_MAX_NO_CHANNELS = 4; - -// worker -GEN_TYPE_boolean pwm_is_running = true; - -GEN_TYPE_int* pwm_channel_values; -GEN_TYPE_boolean* pwm_channel_enabled; - -void pwm_send(int fd) { - size_t i; - - for(i = 0; i < PWM_MAX_NO_CHANNELS; i++) { - if(pwm_channel_enabled[i]) { - maestroWrite(fd, i, pwm_channel_values[i]); - } - } -} - -void* pwm_worker(void* pt_args) { - int fd = open(PWM_DEVICE_NAME, O_RDWR | O_NOCTTY); - - if (fd == -1) { - perror("Error while connecting to pwm device"); - return NULL; - } - - struct termios options; - tcgetattr(fd, &options); - options.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); - options.c_oflag &= ~(ONLCR | OCRNL); - tcsetattr(fd, TCSANOW, &options); - - while(pwm_is_running) { - pwm_send(fd); - usleep(PWM_SLEEP_TIME); - } - - close(fd); - - return NULL; -} - -// init, term -GEN_TYPE_boolean pwm_initialized = false; -GEN_TYPE_boolean pwm_terminated = false; - -void pwm_init(PWM_CHANNEL_T channel) { - // important, since all pwms are accessing the same method - if(!pwm_initialized) { - pwm_channel_values = calloc(sizeof(GEN_TYPE_int), PWM_MAX_NO_CHANNELS); - pwm_channel_enabled = calloc(sizeof(GEN_TYPE_boolean), PWM_MAX_NO_CHANNELS); - - // start a pwm thread - //pthread_t pt_pwm; - //pthread_create(&pt_pwm, NULL, pwm_worker, NULL); - - pwm_initialized = true; - } - - pwm_channel_enabled[channel] = true; -} - -void pwm_term(PWM_CHANNEL_T channel) { - // important, since all pwms are accessing the same method - if(pwm_terminated) return; - - free(pwm_channel_values); - free(pwm_channel_enabled); - - pwm_is_running = false; - pwm_terminated = true; -} - -// writers -void pwm_write(PWM_CHANNEL_T channel, GEN_TYPE_int value) { - pwm_channel_values[channel] = PWM_ADJUST_VALUE(value); -} - -void pwm_set_noval(PWM_CHANNEL_T channel) { - // do nothing, not used -} - diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/io.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/io.c deleted file mode 100644 index 0e446a061228e145396990584ea232579c92c089..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/io.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "inc/io.h" - -// init, terminate -void init_left_stick() { - -} - -void term_left_stick() { - -} - -void init_right_stick() { - -} - -void term_right_stick() { - -} - -// NOVAL -GEN_TYPE_boolean is_noval_left_stick() { - return false; -} - -GEN_TYPE_boolean is_noval_right_stick() { - return false; -} - -// readers -GEN_TYPE_double read_left_stick() { - return 0.0; -} - -GEN_TYPE_double read_right_stick() { - return 0.0; -} - -// writers -void write_left_stick(GEN_TYPE_double value) { - -} - -void write_right_stick(GEN_TYPE_double value) { - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libcansocket.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libcansocket.c deleted file mode 100644 index b57cc6e8b4e33be281d3beec9e2ce293f79c1f30..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libcansocket.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "inc/libcansocket.h" - -struct can_socket* can_socket_open(const char *if_name) { - struct can_socket* sock = malloc(sizeof(struct can_socket)); - - /* open socket */ - if ((sock->s = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0) { - perror("socket"); - return NULL; - } - - sock->addr.can_family = AF_CAN; - - /* map if name to interface index -> will fail if interface does not exist */ - strcpy(sock->ifr.ifr_name, if_name); - if (ioctl(sock->s, SIOCGIFINDEX, &sock->ifr) < 0) { - perror("SIOCGIFINDEX"); - return NULL; - } - sock->addr.can_ifindex = sock->ifr.ifr_ifindex; - - /* bind socket to interface -> will fail if interface is not up */ - if (bind(sock->s, (struct sockaddr *)&sock->addr, sizeof(sock->addr)) < 0) { - perror("bind"); - return NULL; - } - - return sock; -} - -void can_socket_close(struct can_socket* sock) { - close(sock->s); -} - -ssize_t can_socket_send(struct can_socket* sock, struct can_frame* frame) { - ssize_t nbytes; - - /* send frame */ - if ((nbytes = write(sock->s, &frame, sizeof(*frame))) != sizeof(*frame)) { - perror("write"); - return SR_ERR; - } - - return nbytes; -} - -ssize_t can_socket_receive(struct can_socket* sock, struct can_frame* frame) { - ssize_t nbytes; - - if ((nbytes = read(sock->s, frame, sizeof(struct can_frame))) != sizeof(*frame)) { - perror("read"); - return SR_ERR; - } - - return nbytes; -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libmaestro.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libmaestro.c deleted file mode 100644 index 356d569232905277d2da27f2bdc6e3f73eed9949..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libmaestro.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "inc/libmaestro.h" - -// read from channel given a file descriptor -int maestroRead(int fd, unsigned char channel) { - unsigned char command[] = {0x90, channel}; - - if(write(fd, command, sizeof(command)) == -1) - { - perror("error writing"); - return -1; - } - - unsigned char response[2]; - - if(read(fd,response,2) != 2) - { - perror("Error reading from maestro"); - return -1; - } - - return response[0] + 256*response[1]; -} - -// write target to a channel given a file descriptor -// the units of 'target' are quarter-microseconds -int maestroWrite(int fd, unsigned char channel, unsigned short target) { - unsigned char command[] = {0x84, channel, (target & 0x7F), (target >> 7 & 0x7F)}; - - if (write(fd, command, sizeof(command)) == -1) - { - perror("Error writing to maestro"); - return -1; - } - - return 0; -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libuart.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libuart.c deleted file mode 100644 index ca027e83e084cd3fb81452785d970e0f06fcba1b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/libuart.c +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @file uart.c - * @author Bianca Forkel - */ - -#include "inc/libuart.h" - -int uart_filestream = -1; - -/** Initializing the UART connection. */ -int uart_setup(const char *porta) { - strcpy(port, porta); - uart_filestream = open(port, O_RDWR | O_NOCTTY | O_NDELAY); - if (uart_filestream < 0) { - fprintf(stderr, "[%s] Error opening port: %s\n", port, strerror(errno)); - } - - struct termios tty; - memset(&tty, 0, sizeof tty); - if (tcgetattr(uart_filestream, &tty) != 0) { - fprintf(stderr, "[%s] Error from tcgetattr: %s\n", port, strerror(errno)); - } - - // Baud Rate - cfsetospeed(&tty, (speed_t) B115200); - cfsetispeed(&tty, (speed_t) B115200); - - // TTY settings: 8N1 - tty.c_cflag &= ~PARENB; //no parity - tty.c_cflag &= ~CSTOPB; // 1 stop bit - tty.c_cflag &= ~CSIZE; - tty.c_cflag |= CS8; // 8 data bits - - tty.c_cflag &= ~CRTSCTS; - tty.c_cc[VMIN] = 1; - tty.c_cc[VTIME] = 5; - tty.c_cflag |= CREAD | CLOCAL; - - cfmakeraw(&tty); - - uart_flush(); - - if (tcsetattr(uart_filestream, TCSANOW, &tty) != 0) { - fprintf(stderr, "[%s] Error from tcsetattr: %s\n", port, strerror(errno)); - } - return uart_filestream; -} - -/** Sending one byte via UART. */ -int uart_send_byte(char data, int printt) { - if (uart_filestream != -1) { - int n_written = 0; - n_written = write(uart_filestream, &data, 1); - if (n_written < 0) { - if (printt) - fprintf(stderr, "[%s] Error sending byte: %s\n", port, strerror(errno)); - } else { - if (printt) - printf("[%s] Sent byte %#02x\n", port, data); - return 0; - } - } - return -1; -} - -/** Receive from the UART stream. */ -int uart_receive(char *c, int bufLen, int printt) { - fd_set set; - struct timeval timeout; - int rv; - int n_read = -1; - - if (uart_filestream != -1) { - FD_ZERO(&set); - FD_SET(uart_filestream, &set); - - timeout.tv_sec = 0; - timeout.tv_usec = 10000; - - rv = select(uart_filestream + 1, &set, NULL, NULL, &timeout); - if (rv == -1) { - if (printt) - perror("select"); - } else if (rv == 0) { - if (printt) - perror("timeout"); - } else { - n_read = read(uart_filestream, (void *) c, bufLen); - } - - if (n_read < 0) { - if (printt) - fprintf(stderr, "[%s] Error receiving byte: %s\n", port, strerror(errno)); - n_read = 0; - } else if (n_read == 0) { - if (printt) - printf("[%s] No data to receive \n", port); - } else { - if (printt) { - printf("[%s] %i Bytes received: 0x", port, n_read); - int i; - for (i = 0; i < n_read; i++) - printf("%02x", c[i]); - printf("\n"); - } - } - } - return n_read; -} - -/** Close the UART connection. */ -void uart_close() { - close(uart_filestream); -} - -/** Flush the UART buffer. */ -void uart_flush() { - tcflush(uart_filestream, TCIFLUSH); -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/main.c b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/main.c deleted file mode 100644 index 60b5526585bcacf63fc90a7d2e4f2460e8fd622d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/lib/src/main.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * The main function and everything related to starting the application - */ - -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <pthread.h> - -#include "inc-gen/system.h" -#include "inc/CanConnector.h" -#include "inc/Gamepad.h" -#include "inc/PWM.h" - -#define PARAM_MAXCMP 5 -#define PARAM_MASTER "master" -#define PARAM_SLAVE "slave" - -int main(int argc, char* argv[]) { - // init the system - initialize_system(); - - // start a gamepad thread - pthread_t pt_gamepad; - pthread_create(&pt_gamepad, NULL, gp_worker, NULL); - - // start a pwm thread - pthread_t pt_pwm; - pthread_create(&pt_pwm, NULL, pwm_worker, NULL); - - // MASTER MODE (master as parameter) - if(argc >= 2 && strncmp(argv[1], PARAM_MASTER, PARAM_MAXCMP) == 0) { - // TODO do master stuff - } - - // SLAVE MODE (slave as parameter) - else if(argc >= 2 && strncmp(argv[1], PARAM_SLAVE, PARAM_MAXCMP) == 0) { - // TODO do slave stuff - } - - // DEFAULT MODE (no parameter) - else { - // run endlessly - while(1) { - run_system(); - usleep(1000); - } - } - - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/generate-ecore.xml b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/generate-ecore.xml deleted file mode 100644 index 20bba82168d7b19726a80a7151002301a6146d7d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/generate-ecore.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<project name="org.fortiss.af3.platform.raspberry" default="generate-ecore" basedir=".."> - - <property name="model.name" value="raspberry" /> - <property name="model.project" value="org.fortiss.af3.platform.raspberry" /> - - <!-- Classpath Definition --> - <buckminster.valuepath id="project.classpath" value="${fs:project.classpath}" /> - <path id="classpath"> - <path refid="project.classpath"/> - - <!-- add src to the classpath as only the bin directory is in the classpath - and some resources such as the workflow or properties file might not yet - have been copied to the bin directory --> - <pathelement location="src"/> - </path> - - <!-- Generation Tasks --> - <target name="generate-ecore"> - <emf.Ecore2Javaw - model="model/${model.name}.ecore" - genModel="model/${model.name}.genmodel" - modelProject="/${model.project}" - modelProjectFragmentPath="generated-src" - reconcileGenModel="reload"> - </emf.Ecore2Javaw> - </target> -</project> \ No newline at end of file diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.ecore b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.ecore deleted file mode 100644 index 7dbfc2b5fda7e3c40a28105d7b29248524532c1c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.ecore +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/platform/raspberry" - nsPrefix="org-fortiss-af3-platform-raspberry"> - <eClassifiers xsi:type="ecore:EClass" name="RaspberryPi" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericExecutionUnit"/> - <eClassifiers xsi:type="ecore:EClass" name="CanBus" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericTransmissionUnit"/> - <eClassifiers xsi:type="ecore:EClass" name="CanConnector" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericTransceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorConnector" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ActuatorConnector" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericTransmitter"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorGamepad" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorIMU" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorLaserRangeFinder" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorLaserScanner" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ActuatorPWM" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericTransmitter"/> - <eClassifiers xsi:type="ecore:EClass" name="GPI" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="GPO" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericTransmitter"/> - <eClassifiers xsi:type="ecore:EClass" name="WheelEncoder" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eSubpackages name="gamepad" nsURI="http://www.fortiss.org/af3/platform/raspberry/gamepad" - nsPrefix="org-fortiss-af3-platform-raspberry-gamepad"> - <eClassifiers xsi:type="ecore:EClass" name="Button1" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Button2" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Button3" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Button4" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ButtonL1" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ButtonR2" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ButtonL2" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="ButtonR1" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Left_StickX_Position" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Left_StickY_Position" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Right_StickX_Position" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - <eClassifiers xsi:type="ecore:EClass" name="Right_StickY_Position" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//generic/GenericReceiver"/> - </eSubpackages> - <eSubpackages name="annotation" nsURI="http://www.fortiss.org/af3/platform/raspberry/annotation" - nsPrefix="org-fortiss-af3-platform-raspberry-annotation"> - <eClassifiers xsi:type="ecore:EClass" name="Channel" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IAnnotatedSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHiddenSpecification"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="channel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - </eClassifiers> - </eSubpackages> -</ecore:EPackage> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.genmodel b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.genmodel deleted file mode 100644 index 156f41bfdfb5f44cb8dd69a67e717a9d72a7cb8a..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/model/raspberry.genmodel +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" - xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.fortiss.af3.platform.raspberry/generated-src" - modelPluginID="org.fortiss.af3.platform.raspberry" modelName="Raspberry" importerID="org.eclipse.emf.importer.ecore" - containmentProxies="true" arrayAccessors="true" complianceLevel="7.0" copyrightFields="false" - usedGenPackages="platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model"> - <foreignModel>raspberry.ecore</foreignModel> - <genPackages prefix="Model" basePackage="org.fortiss.af3.platform.raspberry" disposableProviderFactory="true" - ecorePackage="raspberry.ecore#/"> - <genClasses ecoreClass="raspberry.ecore#//RaspberryPi"/> - <genClasses ecoreClass="raspberry.ecore#//CanBus"/> - <genClasses ecoreClass="raspberry.ecore#//CanConnector"/> - <genClasses ecoreClass="raspberry.ecore#//SensorConnector"/> - <genClasses ecoreClass="raspberry.ecore#//ActuatorConnector"/> - <genClasses ecoreClass="raspberry.ecore#//SensorGamepad"/> - <genClasses ecoreClass="raspberry.ecore#//SensorIMU"/> - <genClasses ecoreClass="raspberry.ecore#//SensorLaserRangeFinder"/> - <genClasses ecoreClass="raspberry.ecore#//SensorLaserScanner"/> - <genClasses ecoreClass="raspberry.ecore#//ActuatorPWM"/> - <genClasses ecoreClass="raspberry.ecore#//GPI"/> - <genClasses ecoreClass="raspberry.ecore#//GPO"/> - <genClasses ecoreClass="raspberry.ecore#//WheelEncoder"/> - <nestedGenPackages prefix="Gamepad" basePackage="org.fortiss.af3.platform.raspberry.model" - disposableProviderFactory="true" ecorePackage="raspberry.ecore#//gamepad"> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Button1"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Button2"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Button3"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Button4"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/ButtonL1"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/ButtonR2"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/ButtonL2"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/ButtonR1"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Left_StickX_Position"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Left_StickY_Position"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Right_StickX_Position"/> - <genClasses ecoreClass="raspberry.ecore#//gamepad/Right_StickY_Position"/> - </nestedGenPackages> - <nestedGenPackages prefix="Annotation" basePackage="org.fortiss.af3.platform.raspberry.model" - disposableProviderFactory="true" ecorePackage="raspberry.ecore#//annotation"> - <genClasses ecoreClass="raspberry.ecore#//annotation/Channel"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute raspberry.ecore#//annotation/Channel/channel"/> - </genClasses> - </nestedGenPackages> - </genPackages> -</genmodel:GenModel> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.properties b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.properties deleted file mode 100644 index 92e4eb1af5b15035117b45b9f739d77d6995c8d9..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# <copyright> -# </copyright> -# -# $Id$ - -pluginName = Fortiss AF3 Base Project -providerName = fortiss GmbH diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.xml b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.xml deleted file mode 100644 index 397e4f326c2aa0faf9f151f6d5bd948362ef4586..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/plugin.xml +++ /dev/null @@ -1,433 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> - -<!-- - <copyright> - </copyright> - - $Id$ ---> - -<plugin> - - <extension point="org.eclipse.emf.ecore.generated_package"> - <!-- @generated raspberry --> - <package - uri="http://www.fortiss.org/af3/platform/raspberry" - class="org.fortiss.af3.platform.raspberry.model.ModelPackage" - genModel="model/raspberry.genmodel"/> - </extension> - - <extension point="org.eclipse.emf.ecore.generated_package"> - <!-- @generated raspberry --> - <package - uri="http://www.fortiss.org/af3/platform/raspberry/gamepad" - class="org.fortiss.af3.platform.raspberry.model.gamepad.GamepadPackage" - genModel="model/raspberry.genmodel"/> - </extension> - - <extension point="org.eclipse.emf.ecore.generated_package"> - <!-- @generated raspberry --> - <package - uri="http://www.fortiss.org/af3/platform/raspberry/annotation" - class="org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage" - genModel="model/raspberry.genmodel"/> - </extension> - <extension - point="org.fortiss.tooling.kernel.modelElementCompositor"> - <modelElementCompositor - compositor="org.fortiss.af3.platform.raspberry.compose.RaspberryPiCompositor"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> - </modelElementClass> - </modelElementCompositor> - <modelElementCompositor - compositor="org.fortiss.af3.platform.raspberry.compose.CanBusCompositor"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanBus"> - </modelElementClass> - </modelElementCompositor> - </extension> - <extension - point="org.fortiss.tooling.kernel.modelConnectionCompositor"> - <modelConnectionCompositor - modelConnectionCompositor="org.fortiss.af3.platform.raspberry.compose.RaspberryToCanCompositor"> - <source> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - </source> - <target> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - </target> - </modelConnectionCompositor> - <modelConnectionCompositor - modelConnectionCompositor="org.fortiss.af3.platform.raspberry.compose.CanToRaspberryCompositor"> - <source> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - </source> - <target> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </modelElementClass> - </target> - </modelConnectionCompositor> - </extension> - <extension - point="org.fortiss.tooling.kernel.transformationProvider"> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.RaspberryPITransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.RaspberryPIExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CanConnectorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanConnectorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.IMUSensorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorIMU"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.IMUSensorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.LaserRangeFinderSensorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.LaserRangeFinderSensorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.LaserScannerSensorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorLaserScanner"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.LaserScannerSensorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.PWMActuatorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.ActuatorPWM"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.PWMActuatorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CanBusTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CanBus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanBusExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.GamepadSensorTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorGamepad"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.GamepadSensorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CanBusTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CanBus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CanConnectorTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CanConnector"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.GPITransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.GPI"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.GPIExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.GPOTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.GPO"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.GPOExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button1Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button1"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button2Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button2"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button3Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button3"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button4Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button4"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonL1Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonL2Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonR1Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonR2Transformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Left_StickXTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Left_StickYTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Right_StickXTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Right_StickYTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickYExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.WheelEncoderTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.WheelEncoder"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.WheelEncoderExecutable"> - </objectClass> - </target> - </transformationProvider> - </extension> - <extension - point="org.fortiss.tooling.base.annotation"> - <annotation - binding="org.fortiss.af3.platform.annotation.valueprovider.GPIOPinNumberValueProvider"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.GPI"> - </modelElementClass> - </annotation> - <annotation - binding="org.fortiss.af3.platform.annotation.valueprovider.GPIOPinNumberValueProvider"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.GPO"> - </modelElementClass> - </annotation> - <annotation - binding="org.fortiss.af3.platform.raspberry.annotation.PWMChannelNumberValueProvider"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.ActuatorPWM"> - </modelElementClass> - </annotation> - </extension> - - - - -</plugin> diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/pom.xml b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/pom.xml deleted file mode 100644 index 3622f7b7bdc40b492c2e51736ebef1c8b38ea1b8..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - $Id$ - @version $Rev$ - @ConQAT.Rating RED Hash: E1674C4A6DD3CBC4A7B7E85232D9695F ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.fortiss.af3</groupId> - <artifactId>org.fortiss.af3.platform.raspberry</artifactId> - <packaging>eclipse-plugin</packaging> - - <parent> - <groupId>org.fortiss.std.pom</groupId> - <artifactId>std-parent-pom-indigo</artifactId> - <version>1.0</version> - <relativePath>../fortiss-std-env/maven-build/pom.xml</relativePath> - </parent> - - <version>2.9.0-SNAPSHOT</version> -</project> \ No newline at end of file diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/AF3PlatformRaspberryActivator.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/AF3PlatformRaspberryActivator.java deleted file mode 100644 index 8a4cd244c72613522535eed17ca83d86dc2c7522..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/AF3PlatformRaspberryActivator.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.fortiss.af3.platform.raspberry; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle. - */ -public class AF3PlatformRaspberryActivator extends Plugin { - - /** The plug-in ID. */ - public static final String PLUGIN_ID = AF3PlatformRaspberryActivator.class.getPackage().getName(); //$NON-NLS-1$ - - /** The shared instance. */ - private static AF3PlatformRaspberryActivator plugin; - - /** Constructor. */ - public AF3PlatformRaspberryActivator() { - // do nothing - } - - /** {@inheritDoc} */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /** {@inheritDoc} */ - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** Returns the shared instance. */ - public static AF3PlatformRaspberryActivator getDefault() { - return plugin; - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/annotation/PWMChannelNumberValueProvider.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/annotation/PWMChannelNumberValueProvider.java deleted file mode 100644 index 13abd5eb2e261bcf074b0ff2e57b64b81a442b30..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/annotation/PWMChannelNumberValueProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: GPIOPinNumberValueProvider.java 15846 2016-02-02 09:14:08Z zverlov $ -| | -| Copyright 2015 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.annotation; - -import org.fortiss.af3.platform.model.Transceiver; -import org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage; -import org.fortiss.af3.platform.raspberry.model.annotation.Channel; -import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase; -import org.fortiss.tooling.base.annotation.valueprovider.IAnnotationValueProvider; - -/** - * {@link IAnnotationValueProvider} that allows to annotate a Pin Number of a GPIO - * {@link Transceiver} used in PikeOS Platform. - * - * @author chaudhary - * @author $Author: zverlov $ - * @version $Rev: 15846 $ - * @ConQAT.Rating GREEN Hash: C69EECC82FF9912335C19FC6A5CD6996 - */ - -public class PWMChannelNumberValueProvider extends EStructuralFeatureValueProviderBase<Channel> { - - /** Constructor. */ - public PWMChannelNumberValueProvider() { - super(AnnotationPackage.Literals.CHANNEL, AnnotationPackage.Literals.CHANNEL__CHANNEL); - } - - /** {@inheritDoc} */ - @Override - public String getAnnotationName(Channel specification) { - return "PWM Channel"; - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java deleted file mode 100644 index 1a3e29f9e4b11570d859c2680bc83951576eef95..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java +++ /dev/null @@ -1,51 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.compose; - -import static org.conqat.lib.commons.reflect.ReflectionUtils.isInstanceOfAny; - -import org.eclipse.emf.ecore.EObject; -import org.fortiss.af3.platform.compose.PlatformArchitectureElementCompositorBase; -import org.fortiss.af3.platform.model.IPlatformArchitectureElement; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.af3.platform.raspberry.model.CanConnector; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanBusCompositor extends - PlatformArchitectureElementCompositorBase<IPlatformArchitectureElement> { - - /** {@inheritDoc} */ - @Override - protected boolean isCorrectElementClass(IPlatformArchitectureElement container, - EObject contained) { - final boolean instanceOfAny = isInstanceOfAny(contained, CanConnector.class); - if(container != null) { - final boolean instanceOfAny2 = isInstanceOfAny(container, CanBus.class); - return instanceOfAny2 && - instanceOfAny; - } - return instanceOfAny; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanToRaspberryCompositor.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanToRaspberryCompositor.java deleted file mode 100644 index ef580fefd707e825574909373c0400e613f4fb9d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/CanToRaspberryCompositor.java +++ /dev/null @@ -1,99 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.compose; - -import static org.fortiss.af3.platform.utils.PlatformModelElementFactory.createTransmissionConnection; - -import org.eclipse.emf.ecore.EObject; -import org.fortiss.af3.platform.model.TransmissionConnection; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.tooling.base.model.element.IHierarchicElement; -import org.fortiss.tooling.kernel.extension.IConnectionCompositor; -import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext; - -/** - * Connection compositor for {@link RaspberryPi} to {@link CanBus} connections. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanToRaspberryCompositor implements - IConnectionCompositor<IHierarchicElement, CanConnector, CanConnector> { - - /** {@inheritDoc} */ - @Override - public boolean canConnect(CanConnector source, CanConnector target, IHierarchicElement parent, - IConnectionCompositionContext context) { - if(source.getOwner() instanceof CanBus && target.getOwner() instanceof RaspberryPi) { - return source.getOutgoing().isEmpty(); - } - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean connect(CanConnector source, CanConnector target, IHierarchicElement parent, - IConnectionCompositionContext context) { - createTransmissionConnection(parent, source, target); - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean canReconnect(EObject connection, CanConnector source, CanConnector target, - IConnectionCompositionContext context) { - // TODO Auto-generated method stub - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean reconnect(EObject connection, CanConnector source, CanConnector target, - IConnectionCompositionContext context) { - // TODO Auto-generated method stub - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean canDisconnect(EObject connection) { - if(connection instanceof TransmissionConnection) { - TransmissionConnection c = (TransmissionConnection)connection; - return c.getSource() instanceof CanConnector && c.getTarget() instanceof CanConnector; - } - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean disconnect(EObject connection) { - if(connection instanceof TransmissionConnection) { - TransmissionConnection tcon = ((TransmissionConnection)connection); - tcon.setOwner(null); - tcon.setSource(null); - tcon.setTarget(null); - return true; - } - return false; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java deleted file mode 100644 index 7a6d8b6ec32dd6641f197dc0366610f89ed0c292..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java +++ /dev/null @@ -1,79 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.compose; - -import static org.conqat.lib.commons.reflect.ReflectionUtils.isInstanceOfAny; - -import org.eclipse.emf.ecore.EObject; -import org.fortiss.af3.platform.compose.PlatformArchitectureElementCompositorBase; -import org.fortiss.af3.platform.model.IPlatformArchitectureElement; -import org.fortiss.af3.platform.raspberry.model.ActuatorConnector; -import org.fortiss.af3.platform.raspberry.model.ActuatorPWM; -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.RaspberryPi; -import org.fortiss.af3.platform.raspberry.model.SensorConnector; -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.WheelEncoder; -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.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; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPiCompositor extends - PlatformArchitectureElementCompositorBase<IPlatformArchitectureElement> { - - /** {@inheritDoc} */ - @Override - protected boolean isCorrectElementClass(IPlatformArchitectureElement container, - EObject contained) { - - final boolean instanceOfAny2 = - isInstanceOfAny(contained, CanConnector.class, SensorConnector.class, - ActuatorConnector.class, ActuatorPWM.class, SensorLaserRangeFinder.class, - SensorLaserScanner.class, SensorIMU.class, GPI.class, GPO.class, - Button1.class, Button2.class, Button3.class, Button4.class, ButtonL1.class, - ButtonL2.class, ButtonR1.class, ButtonR2.class, Left_StickX_Position.class, - Left_StickY_Position.class, Right_StickX_Position.class, - Right_StickY_Position.class, WheelEncoder.class); - if(container != null) { - final boolean instanceOfAny = isInstanceOfAny(container, RaspberryPi.class); - return instanceOfAny && instanceOfAny2; - } - return instanceOfAny2; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryToCanCompositor.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryToCanCompositor.java deleted file mode 100644 index 7c18a6de8fa0cfc18d7dfb8c43ff314bc99d5429..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/compose/RaspberryToCanCompositor.java +++ /dev/null @@ -1,99 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.compose; - -import static org.fortiss.af3.platform.utils.PlatformModelElementFactory.createTransmissionConnection; - -import org.eclipse.emf.ecore.EObject; -import org.fortiss.af3.platform.model.TransmissionConnection; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.tooling.base.model.element.IHierarchicElement; -import org.fortiss.tooling.kernel.extension.IConnectionCompositor; -import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext; - -/** - * Connection compositor for {@link RaspberryPi} to {@link CanBus} connections. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryToCanCompositor implements - IConnectionCompositor<IHierarchicElement, CanConnector, CanConnector> { - - /** {@inheritDoc} */ - @Override - public boolean canConnect(CanConnector source, CanConnector target, IHierarchicElement parent, - IConnectionCompositionContext context) { - if(source.getOwner() instanceof RaspberryPi && target.getOwner() instanceof CanBus) { - return source.getOutgoing().isEmpty(); - } - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean connect(CanConnector source, CanConnector target, IHierarchicElement parent, - IConnectionCompositionContext context) { - createTransmissionConnection(parent, source, target); - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean canReconnect(EObject connection, CanConnector source, CanConnector target, - IConnectionCompositionContext context) { - // TODO Auto-generated method stub - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean reconnect(EObject connection, CanConnector source, CanConnector target, - IConnectionCompositionContext context) { - // TODO Auto-generated method stub - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean canDisconnect(EObject connection) { - if(connection instanceof TransmissionConnection) { - TransmissionConnection c = (TransmissionConnection)connection; - return c.getSource() instanceof CanConnector && c.getTarget() instanceof CanConnector; - } - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean disconnect(EObject connection) { - if(connection instanceof TransmissionConnection) { - TransmissionConnection tcon = ((TransmissionConnection)connection); - tcon.setOwner(null); - tcon.setSource(null); - tcon.setTarget(null); - return true; - } - return false; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanBusExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanBusExecutable.java deleted file mode 100644 index d8f0d797b46490610742ddda93ce001773d0952c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanBusExecutable.java +++ /dev/null @@ -1,55 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 java.util.List; -import java.util.Map; - -import org.fortiss.af3.component.model.Component; -import org.fortiss.af3.component.model.Port; -import org.fortiss.af3.generator.common.model.source.SourcePackage; -import org.fortiss.af3.platform.language.executable.TransmissionUnitExecutableBase; -import org.fortiss.af3.platform.model.ExecutionUnit; -import org.fortiss.af3.platform.model.TransmissionUnit; -import org.fortiss.af3.platform.raspberry.model.CanBus; - -/** - * Executable for {@link CanBus}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanBusExecutable extends TransmissionUnitExecutableBase<TransmissionUnit> { - - /** Constructor. */ - public CanBusExecutable(TransmissionUnit modelElement) { - super(modelElement); - // no functionality as of now - } - - /** {@inheritDoc} */ - @Override - public void createAllFiles(SourcePackage pack, Map<ExecutionUnit, List<Port>> euPortsPair, - Map<ExecutionUnit, List<Component>> euComponentList, Component topComponent, - int deploymentID) { - // no functionality as of now - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanConnectorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanConnectorExecutable.java deleted file mode 100644 index b69b60a7117378fd11e67304333074f5571d967b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanConnectorExecutable.java +++ /dev/null @@ -1,115 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.rawString; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.expression.model.terms.RawString; -import org.fortiss.af3.expression.model.types.TBool; -import org.fortiss.af3.expression.model.types.TDouble; -import org.fortiss.af3.expression.model.types.TInt; -import org.fortiss.af3.platform.generic.generator.executable.GenericTransceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericTransceiver; -import org.fortiss.af3.platform.raspberry.model.CanConnector; - -/** - * Executable for {@link CanConnector}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanConnectorExecutable extends GenericTransceiverExecutable { - - /** Constructor. */ - public CanConnectorExecutable(GenericTransceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // init CAN bus on the given interface - return funcCall("can_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - // check for NOVAL on the given signal port - return funcCall("can_is_noval", literalString(logicalSignal.getName())); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - // set NOVAL on the given signal port - return funcCall("can_set_noval", literalString(logicalSignal.getName())); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // terminate the bus on the given interface - return funcCall("can_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // read the value on the given signal port depending on the variable type - if(logicalSignal.getVariableType() instanceof TBool) { - return funcCall("can_read_bool", literalString(logicalSignal.getName())); - } else if(logicalSignal.getVariableType() instanceof TDouble) { - return funcCall("can_read_double", literalString(logicalSignal.getName())); - } else if(logicalSignal.getVariableType() instanceof TInt) { - return funcCall("can_read_int", literalString(logicalSignal.getName())); - } else { - throw new RuntimeException("unknown data type: " + - logicalSignal.getVariableType().getTypeClassName()); - } - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // write the value on the given signal port depending on the variable type - if(logicalSignal.getVariableType() instanceof TBool) { - return funcCall("can_write_bool", literalString(logicalSignal.getName()), value); - } else if(logicalSignal.getVariableType() instanceof TDouble) { - return funcCall("can_write_double", literalString(logicalSignal.getName()), value); - } else if(logicalSignal.getVariableType() instanceof TInt) { - return funcCall("can_write_int", literalString(logicalSignal.getName()), value); - } else { - throw new RuntimeException("unknown data type: " + - logicalSignal.getVariableType().getTypeClassName()); - } - } - - /** - * builds a constant literal C string including double quotes - */ - private RawString literalString(String str) { - return rawString("\"" + str + "\""); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanTransmissionCatalog.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanTransmissionCatalog.java deleted file mode 100644 index 8f3a64fdda743adce6e38b9d815a55fd91ab7ed6..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/CanTransmissionCatalog.java +++ /dev/null @@ -1,55 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 java.util.ArrayList; -import java.util.List; - -import org.fortiss.af3.deployment.generator.DeploymentExecutableTransformationContext; -import org.fortiss.af3.deployment.generator.Transmission; -import org.fortiss.af3.deployment.generator.TransmissionCatalog; -import org.fortiss.af3.generator.common.model.c.CSourcePackage; - -/** - * Can Transmission Catalog - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanTransmissionCatalog extends TransmissionCatalog { - - /** Stores the transmissions contained in this catalog. */ - private final List<Transmission> transmissions = new ArrayList<Transmission>(); - - /** Adds the given transmission to the catalog. */ - @Override - public void addTransmission(Transmission transmission) { - transmissions.add(transmission); - } - - /** - * Here the one can create additional SourcePackages which are common for all ECUs. - * It won't be used in the current release. - */ - @Override - public CSourcePackage getSourcePackage(DeploymentExecutableTransformationContext ctx) { - return null; - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java deleted file mode 100644 index 5d6b311db416fdc8b9cd6301069b8e526afe0058..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.intConst; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.annotation.GPIOPin; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.GPI; -import org.fortiss.tooling.base.utils.AnnotationUtils; - -/** - * Executable for {@link GPI}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GPIExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public GPIExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gpio_init_in", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gpio_is_noval", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gpio_term", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gpio_read", intConst(getPinFromModelElement(modelElement))); - } - - private static int getPinFromModelElement(GenericReceiver modelElement) { - return AnnotationUtils.getAnnotation(modelElement, GPIOPin.class).getPinNumber(); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java deleted file mode 100644 index a64a68c0eecb5bae7c02ff61790f039bf3fb43ab..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.intConst; - -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericTransmitterExecutable; -import org.fortiss.af3.platform.model.annotation.GPIOPin; -import org.fortiss.af3.platform.model.generic.GenericTransmitter; -import org.fortiss.af3.platform.raspberry.model.GPO; -import org.fortiss.tooling.base.utils.AnnotationUtils; - -/** - * Executable for {@link GPO}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GPOExecutable extends GenericTransmitterExecutable { - - /** Constructor. */ - public GPOExecutable(GenericTransmitter modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gpio_init_out", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - return funcCall("gpio_set_noval", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gpio_term", intConst(getPinFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - return funcCall("gpio_write", intConst(getPinFromModelElement(modelElement)), value); - } - - private static int getPinFromModelElement(GenericTransmitter modelElement) { - return AnnotationUtils.getAnnotation(modelElement, GPIOPin.class).getPinNumber(); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GamepadSensorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GamepadSensorExecutable.java deleted file mode 100644 index f335e8ecb040d58a9ad647e719272a5b1ddf233c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/GamepadSensorExecutable.java +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.SensorIMU; - -/** - * Executable for {@link SensorIMU}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GamepadSensorExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public GamepadSensorExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return super.getInitialization(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return super.getNoValGuardAccessor(logicalSignal); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return super.getTermination(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return super.getValueReadAccessor(logicalSignal); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/IMUSensorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/IMUSensorExecutable.java deleted file mode 100644 index bec3e38f8def54624677b3424b3edb232f165cdb..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/IMUSensorExecutable.java +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.SensorIMU; - -/** - * Executable for {@link SensorIMU}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class IMUSensorExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public IMUSensorExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return super.getInitialization(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return super.getNoValGuardAccessor(logicalSignal); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return super.getTermination(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return super.getValueReadAccessor(logicalSignal); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserRangeFinderSensorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserRangeFinderSensorExecutable.java deleted file mode 100644 index 6fa57e26dc2859e7d660b05abd535a97bafdea5c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserRangeFinderSensorExecutable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder; - -/** - * Executable for {@link SensorLaserRangeFinder}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class LaserRangeFinderSensorExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public LaserRangeFinderSensorExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("lrf_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("lrf_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("lrf_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("lrf_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserScannerSensorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserScannerSensorExecutable.java deleted file mode 100644 index 5c64931b9e705d2d14f01895862a5f53b09e7f63..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/LaserScannerSensorExecutable.java +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.SensorLaserScanner; - -/** - * Executable for {@link SensorLaserScanner}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class LaserScannerSensorExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public LaserScannerSensorExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return super.getInitialization(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return super.getNoValGuardAccessor(logicalSignal); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return super.getTermination(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return super.getValueReadAccessor(logicalSignal); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/PWMActuatorExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/PWMActuatorExecutable.java deleted file mode 100644 index 34c1cb46e514379b0880881adf8aca7dec9f53e1..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/PWMActuatorExecutable.java +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.intConst; - -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericTransmitterExecutable; -import org.fortiss.af3.platform.model.generic.GenericTransmitter; -import org.fortiss.af3.platform.raspberry.model.ActuatorPWM; -import org.fortiss.af3.platform.raspberry.model.annotation.Channel; -import org.fortiss.tooling.base.utils.AnnotationUtils; - -/** - * Executable for {@link ActuatorPWM}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class PWMActuatorExecutable extends GenericTransmitterExecutable { - - /** Constructor. */ - public PWMActuatorExecutable(GenericTransmitter modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("pwm_init", intConst(getPWMChannelFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - return funcCall("pwm_set_noval", intConst(getPWMChannelFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("pwm_term", intConst(getPWMChannelFromModelElement(modelElement))); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - return funcCall("pwm_write", intConst(getPWMChannelFromModelElement(modelElement)), value); - } - - private int getPWMChannelFromModelElement(GenericTransmitter modelElement) { - return AnnotationUtils.getAnnotation(modelElement, Channel.class).getChannel(); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPIExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPIExecutable.java deleted file mode 100644 index 920e0922fd8cf136dea062f526d510c6555eb433..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPIExecutable.java +++ /dev/null @@ -1,207 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.generator.common.utils.CLanguageModelElementFacade.addUserHeaderInclude; -import static org.fortiss.af3.generator.common.utils.SourceModelElementFactory.createByteContentUnitForPluginFile; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Set; - -import org.conqat.lib.commons.collections.Pair; -import org.fortiss.af3.component.model.Component; -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.component.model.generator.ComponentFunction; -import org.fortiss.af3.component.model.generator.LocalFunction; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.expression.model.terms.imperative.IStatementTerm; -import org.fortiss.af3.generator.common.model.c.CSourcePackage; -import org.fortiss.af3.generator.common.model.source.SourceUnit; -import org.fortiss.af3.platform.generic.generator.executable.GenericExecutionUnitExecutable; -import org.fortiss.af3.platform.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.IReadableExecutable; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.IWritableExecutable; -import org.fortiss.af3.platform.model.ExecutionUnit; -import org.fortiss.af3.platform.model.PlatformConnectorUnit; -import org.fortiss.af3.platform.model.generic.GenericTransceiver; -import org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * {@link IInitializableExecutable} and {@link ITerminatableExecutable} for the {@link RaspberryPi} - * platform. - * - * - * @author eder - * @author $Author: eder $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPIExecutable extends GenericExecutionUnitExecutable { - - private static final String SRC_LIB_SUB_PACKAGE_NAME = "src-lib"; - private static final String INC_LIB_SUB_PACKAGE_NAME = "inc-lib"; - - /** Constructor. */ - public RaspberryPIExecutable(ExecutionUnit modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - protected CSourcePackage createExecutionUnitSourcePackage(String name, - List<Pair<ExecutionUnit, Component>> deployedComponents, - List<Pair<PlatformConnectorUnit, Port>> deployedPorts, ITransformationContext context) { - - CSourcePackage pkg = - super.createExecutionUnitSourcePackage(name, deployedComponents, deployedPorts, - context); - - // get system.h to add references to self-defined inc files - SourceUnit system = pkg.getSrcGenPackage().findSourceUnitByName("system.c"); - - // Add source/header files here to be copied into the deployment directory - try { - /** COMPONENTS **/ - - addFile(pkg, "src/main.c"); - - // reference is added by GenericExecutableBase -> only add file - addFile(pkg, "inc/io.h"); - addFile(pkg, "src/io.c"); - - // add all components including references - addFilesWithReference(pkg, system, "CanConnector"); - addFilesWithReference(pkg, system, "Gamepad"); - addFilesWithReference(pkg, system, "GPIO"); - addFilesWithReference(pkg, system, "IMU"); - addFilesWithReference(pkg, system, "LaserRangeFinder"); - addFilesWithReference(pkg, system, "LaserScanner"); - addFilesWithReference(pkg, system, "PWM"); - - /** LIBRARIES **/ - - // add UART lib - addFile(pkg, "inc/libuart.h"); - addFile(pkg, "src/libuart.c"); - addFile(pkg, "inc/libmaestro.h"); - addFile(pkg, "src/libmaestro.c"); - addFile(pkg, "inc/libcansocket.h"); - addFile(pkg, "src/libcansocket.c"); - - /** FIXES AND PATCHES **/ - - // overwrite data_dictionary, the new one has all functions - // required for the simulation commented out so there are no - // conflicts - addFile(pkg, "inc-gen/data_dictionary.h"); - addFile(pkg, "src-gen/data_dictionary.c"); - - // overwrite Makedefs, the new one uses -std=gnu99 instead of -std=c99 - // so libuart compiles properly - addFile(pkg, "Makedefs"); - - } catch(IOException | URISyntaxException e) { - throw new RuntimeException("could not add header and source files from lib", e); - } - - return pkg; - } - - private static void addFilesWithReference(CSourcePackage pkg, SourceUnit source, - String fileWithoutExtension) throws IOException, URISyntaxException { - addFile(pkg, "src/" + fileWithoutExtension + ".c"); - addFile(pkg, "inc/" + fileWithoutExtension + ".h"); - addSystemCReference(source, fileWithoutExtension); - } - - private static void addFile(CSourcePackage pkg, String file) throws IOException, - URISyntaxException { - pkg.addUnit(createByteContentUnitForPluginFile(AF3PlatformRaspberryActivator.PLUGIN_ID, - "lib", file, false)); - } - - private static void addSystemCReference(SourceUnit source, String reference) { - addUserHeaderInclude(source, reference); - } - - /** {@inheritDoc} */ - @Override - protected ComponentFunction createInitializeFunction( - List<Pair<ExecutionUnit, Component>> deployedComponents, - Set<PlatformConnectorUnit> usedUnits) { - return super.createInitializeFunction(deployedComponents, usedUnits); - } - - /** {@inheritDoc} */ - @Override - protected void - createReadAccess(IReadableExecutable exec, InputPort p, List<IStatementTerm> body) { - super.createReadAccess(exec, p, body); - } - - /** {@inheritDoc} */ - @Override - protected LocalFunction createReadInputFunction( - List<Pair<PlatformConnectorUnit, Port>> deployedPorts, - Set<GenericTransceiver> usedTransceivers) { - return super.createReadInputFunction(deployedPorts, usedTransceivers); - } - - /** {@inheritDoc} */ - @Override - protected ComponentFunction createStepFunction( - List<Pair<ExecutionUnit, Component>> deployedComponents, - List<Pair<PlatformConnectorUnit, Port>> deployedPorts, - Set<GenericTransceiver> usedTransceivers) { - return super.createStepFunction(deployedComponents, deployedPorts, usedTransceivers); - } - - /** {@inheritDoc} */ - @Override - protected LocalFunction createTerminationFunction(Set<PlatformConnectorUnit> usedUnits) { - return super.createTerminationFunction(usedUnits); - } - - /** {@inheritDoc} */ - @Override - protected void createWriteAccess(IWritableExecutable exec, OutputPort p, - List<IStatementTerm> body) { - super.createWriteAccess(exec, p, body); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("init_raspberryPI_ecu"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("term_raspberryPI_ecu"); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/WheelEncoderExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/WheelEncoderExecutable.java deleted file mode 100644 index 5da6e0d0a515c476a402cb868e33039af5875b8f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/WheelEncoderExecutable.java +++ /dev/null @@ -1,39 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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 org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder; -import org.fortiss.af3.platform.raspberry.model.WheelEncoder; - -/** - * Executable for {@link SensorLaserRangeFinder}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class WheelEncoderExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public WheelEncoderExecutable(WheelEncoder modelElement) { - super(modelElement); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java deleted file mode 100644 index bb21628552ba603d5143013292242b3601654490..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button1; - -/** - * Executable for {@link Button1}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button1Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public Button1Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btn1_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btn1_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java deleted file mode 100644 index 4926a0a5261be7ef9d326045a3d19e2cf0dea2f6..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button2; - -/** - * Executable for {@link Button2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button2Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public Button2Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btn2_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btn2_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java deleted file mode 100644 index 75c8149eed510b25030a3c8b65b26bd3e745e9a1..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button3; - -/** - * Executable for {@link Button3}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button3Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public Button3Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btn3_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btn3_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java deleted file mode 100644 index b8f99e8c97854392c86e163ab7022c3955386400..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button4; - -/** - * Executable for {@link Button4}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button4Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public Button4Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btn4_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btn4_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java deleted file mode 100644 index 3fb2b780f892cf0abd866360e53615dc43e2f4f8..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1; - -/** - * Executable for {@link ButtonL1}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonL1Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public ButtonL1Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnL1_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnL1_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java deleted file mode 100644 index 0e5a0645b4f233b6218c0877dc409b0b3d16a6bd..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; - -/** - * Executable for {@link ButtonL2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonL2Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public ButtonL2Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnL2_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnL2_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java deleted file mode 100644 index 4761f1671eae32f2d010b03f2912f8bea10af049..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1; - -/** - * Executable for {@link ButtonR1}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonR1Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public ButtonR1Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnR1_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnR1_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java deleted file mode 100644 index 59d42182af0797c5d4352ec4b37f78c1a0655f30..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; - -/** - * Executable for {@link ButtonL2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonR2Executable extends GenericReceiverExecutable { - - /** Constructor. */ - public ButtonR2Executable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnR2_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnR2_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java deleted file mode 100644 index c2d30bc1aa603fcb5e55253fb9146d68e6af3ccf..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position; - -/** - * Executable for {@link Left_StickX_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Left_StickXExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public Left_StickXExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnLX_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnLX_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java deleted file mode 100644 index 8516209ebb56777b00859bf38627decd0ac00fdd..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position; - -/** - * Executable for {@link Left_StickY_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Left_StickYExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public Left_StickYExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnLY_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnLY_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java deleted file mode 100644 index 5d684e9d3b8068f691c6bd70af4124e65ff56fdf..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position; - -/** - * Executable for {@link Right_StickX_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Right_StickXExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public Right_StickXExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnRX_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnRX_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java deleted file mode 100644 index afcb06d97f53c9737b738802381587240f0fb6f0..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.gamepad; - -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; -import org.fortiss.af3.platform.model.generic.GenericReceiver; -import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position; - -/** - * Executable for {@link Right_StickY_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Right_StickYExecutable extends GenericReceiverExecutable { - - /** Constructor. */ - public Right_StickYExecutable(GenericReceiver modelElement) { - super(modelElement); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - return funcCall("gp_init"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("gp_btnRY_is_noval"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - return funcCall("gp_term"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - return funcCall("gp_btnRY_read"); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransformation.java deleted file mode 100644 index e486ff8a22439e51c5fe37fcc78c403cd5d119cf..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.CanBusExecutable; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link CanBus}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanBusTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CanBusExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CanBus.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CanBus; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CanBusExecutable((CanBus)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransmissionCatalogTransformation.java deleted file mode 100644 index 7609aa34553960be92c85eb7103a3ddeab120aeb..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanBusTransmissionCatalogTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: GenericTransmisstionUnitTransmissionCatalogTransformation.java 5274 2012-08-02 07:54:11Z mou $ -| | -| Copyright 2011 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.transform; - -import org.fortiss.af3.deployment.generator.TransmissionCatalog; -import org.fortiss.af3.platform.model.generic.GenericTransmissionUnit; -import org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog; -import org.fortiss.af3.platform.raspberry.model.CanBus; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * {@link TransmissionCatalog} generator for {@link GenericTransmissionUnit}. - * - * @author hoelzl - * @author $Author: mou $ - * @version $Rev: 5274 $ - * @ConQAT.Rating GREEN Hash: C4318B1D240DC4CACC2BB0311CB2B23A - */ -public class CanBusTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CanTransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CanBus.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CanBus; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CanTransmissionCatalog(); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransformation.java deleted file mode 100644 index c13843496c2884f2bdde186b05a8a072f70e8ae5..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.CanConnectorExecutable; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link CanConnector}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CanConnectorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CanConnectorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CanConnector.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CanConnector; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CanConnectorExecutable((CanConnector)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransmissionCatalogTransformation.java deleted file mode 100644 index d60a8b87a4df5b2d4227c8e2add1ee1f909eab68..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/CanConnectorTransmissionCatalogTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: GenericTransceiverTransmissionCatalogTransformation.java 5274 2012-08-02 07:54:11Z mou $ -| | -| Copyright 2011 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.transform; - -import org.fortiss.af3.deployment.generator.TransmissionCatalog; -import org.fortiss.af3.platform.model.generic.GenericTransceiver; -import org.fortiss.af3.platform.raspberry.generator.executable.CanTransmissionCatalog; -import org.fortiss.af3.platform.raspberry.model.CanConnector; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * {@link TransmissionCatalog} generator for {@link GenericTransceiver}. - * - * @author hoelzl - * @author $Author: mou $ - * @version $Rev: 5274 $ - * @ConQAT.Rating GREEN Hash: 99AE1800CB3BA900FDB2FD75FC254AD4 - */ -public class CanConnectorTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CanTransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CanConnector.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CanConnector; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CanTransmissionCatalog(); - } -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java deleted file mode 100644 index ab91a6147058b0d300100ac7070133f9bee3c02a..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.GPIExecutable; -import org.fortiss.af3.platform.raspberry.model.GPI; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link GPI}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GPITransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return GPIExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return GPI.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof GPI; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new GPIExecutable((GPI)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java deleted file mode 100644 index 9a010deb5e9bc577bdc3a5a64dd943b3da53ac4d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.GPOExecutable; -import org.fortiss.af3.platform.raspberry.model.GPO; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link GPO}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GPOTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return GPOExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return GPO.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof GPO; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new GPOExecutable((GPO)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GamepadSensorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GamepadSensorTransformation.java deleted file mode 100644 index 3e81e0263d2432fe872f1de4374c2b365ccc5d79..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/GamepadSensorTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.GamepadSensorExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorGamepad; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class GamepadSensorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return GamepadSensorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorGamepad.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorGamepad; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new GamepadSensorExecutable((SensorGamepad)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/IMUSensorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/IMUSensorTransformation.java deleted file mode 100644 index 6648dc620e5c317592d3429bd5417f3e1df4d801..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/IMUSensorTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.IMUSensorExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorIMU; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link SensorIMU}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class IMUSensorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return IMUSensorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorIMU.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorIMU; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new IMUSensorExecutable((SensorIMU)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserRangeFinderSensorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserRangeFinderSensorTransformation.java deleted file mode 100644 index 68e2a36423d291c62f6048f0afcc3b8ae6353c48..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserRangeFinderSensorTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.LaserRangeFinderSensorExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link SensorLaserRangeFinder}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class LaserRangeFinderSensorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return LaserRangeFinderSensorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorLaserRangeFinder.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorLaserRangeFinder; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new LaserRangeFinderSensorExecutable((SensorLaserRangeFinder)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserScannerSensorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserScannerSensorTransformation.java deleted file mode 100644 index e5c80421e47d0e63ef4e8fb14426ad47d7c9de7b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/LaserScannerSensorTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.LaserScannerSensorExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorLaserScanner; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link SensorLaserScanner}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class LaserScannerSensorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return LaserScannerSensorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorLaserScanner.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorLaserScanner; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new LaserScannerSensorExecutable((SensorLaserScanner)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/PWMActuatorTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/PWMActuatorTransformation.java deleted file mode 100644 index 3edc3262a9f9a98f33dcedd1982095bf06df01f8..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/PWMActuatorTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.PWMActuatorExecutable; -import org.fortiss.af3.platform.raspberry.model.ActuatorPWM; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link ActuatorPWM}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class PWMActuatorTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return PWMActuatorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ActuatorPWM.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ActuatorPWM; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new PWMActuatorExecutable((ActuatorPWM)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPITransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPITransformation.java deleted file mode 100644 index dabce8392532fc04a899859b34ba514d26a04673..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPITransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.RaspberryPIExecutable; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation from {@link RaspberryPi} to {@link RaspberryPIExecutable}. - * - * @author eder - * @author $Author: eder $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPITransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return RaspberryPIExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return RaspberryPi.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof RaspberryPi; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new RaspberryPIExecutable((RaspberryPi)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/WheelEncoderTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/WheelEncoderTransformation.java deleted file mode 100644 index 88dcfa11ac18d7acca87c62dfbc3d4b5a41df71f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/WheelEncoderTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform; - -import org.fortiss.af3.platform.raspberry.generator.executable.WheelEncoderExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder; -import org.fortiss.af3.platform.raspberry.model.WheelEncoder; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link SensorLaserRangeFinder}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class WheelEncoderTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return WheelEncoder.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return WheelEncoder.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof WheelEncoder; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new WheelEncoderExecutable((WheelEncoder)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java deleted file mode 100644 index e45b89e2a36d8539eb404a28f493fa3ef54b9142..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button1; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Button1} - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button1Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return Button1Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Button1.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Button1; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Button1Executable((Button1)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java deleted file mode 100644 index 8e3e58cf51dea515e251be05ebf4abba150fe24f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button2; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Button2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button2Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return Button2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Button2.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Button2; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Button2Executable((Button2)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java deleted file mode 100644 index c599e6c4c60233bf246657f4cf703b71a624ecda..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button3; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Button3}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button3Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return Button3Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Button3.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Button3; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Button3Executable((Button3)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java deleted file mode 100644 index a5e9affb7fc50a61df77f5edfe587dab681f14ec..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Button4; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Button4}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Button4Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return Button4Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Button4.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Button4; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Button4Executable((Button4)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java deleted file mode 100644 index 55a3f76ae507cfda329c46bf143298c3b1eead8f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link ButtonL1}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonL1Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonL1Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ButtonL1.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ButtonL1; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ButtonL1Executable((ButtonL1)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java deleted file mode 100644 index 2b358b7319fe22bd676139053bf3be7ff3f98197..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link ButtonL2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonL2Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonL2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ButtonL2.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ButtonL2; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ButtonL2Executable((ButtonL2)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java deleted file mode 100644 index ccfbbef4c422202ecaf94c12945c626a00b14be9..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link ButtonR1}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonR1Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR1Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ButtonR1.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ButtonR1; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ButtonR1Executable((ButtonR1)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java deleted file mode 100644 index 3e66560cbf087ba6a15db2e3bcc6488b8e750cdf..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; -import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link ButtonR2}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class ButtonR2Transformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ButtonR2.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ButtonR2; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ButtonR2Executable((ButtonR2)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java deleted file mode 100644 index 90c1713f73468f07637ca8e742fb29d9a2468e93..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Left_StickX_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Left_StickXTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Left_StickX_Position.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Left_StickX_Position; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Left_StickXExecutable((Left_StickX_Position)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java deleted file mode 100644 index 2d322eaf39590999928edae896d6560436d1990c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Left_StickY_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Left_StickYTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Left_StickY_Position.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Left_StickY_Position; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Left_StickYExecutable((Left_StickY_Position)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java deleted file mode 100644 index 984b3312688f312b98ac90ebfbe9af91cc1b0421..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Right_StickX_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Right_StickXTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Right_StickX_Position.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Right_StickX_Position; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Right_StickXExecutable((Right_StickX_Position)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java deleted file mode 100644 index ba6b02daab292ca479d166f3a59247e60a2ba678..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.transform.gamepad; - -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; -import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickYExecutable; -import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * Transformation for {@link Right_StickY_Position}. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class Right_StickYTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ButtonR2Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Right_StickY_Position.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Right_StickY_Position; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new Right_StickYExecutable((Right_StickY_Position)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java b/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java deleted file mode 100644 index 9d7c2d5f1493ab5879f03ce21766045754f50455..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/tags/end-of-first-course/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java +++ /dev/null @@ -1,261 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ -| | -| Copyright 2017 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.util; - -import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createConnectorLayout; - -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; -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.WheelEncoder; -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; - -/** - * Model Element for RaspberryPi and related models. - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryModelElementFactory { - - /** Creates a {@link RaspberryPi}. */ - public static RaspberryPi createRaspberryPi() { - final RaspberryPi pi = ModelFactory.eINSTANCE.createRaspberryPi(); - LayoutModelElementFactory.createNodeElementLayout(pi); - pi.setName("RaspberryPI"); - return pi; - } - - /** Creates a {@link CanBus}. */ - public static CanBus createCanBus() { - final CanBus bus = ModelFactory.eINSTANCE.createCanBus(); - LayoutModelElementFactory.createNodeElementLayout(bus); - bus.setName("CanBus"); - return bus; - } - - /** Creates a {@link CanConnector}. */ - public static CanConnector createCanConnector() { - CanConnector canConnector = ModelFactory.eINSTANCE.createCanConnector(); - canConnector.setName("CanConnector"); - createConnectorLayout(canConnector); - return canConnector; - } - - /** Creates a {@link SensorConnector}. */ - public static SensorConnector createSensorConnector() { - SensorConnector connector = ModelFactory.eINSTANCE.createSensorConnector(); - connector.setName("Sensor"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link SensorGamepad} */ - public static SensorGamepad createGamepadSensor() { - SensorGamepad connector = ModelFactory.eINSTANCE.createSensorGamepad(); - connector.setName("Gamepad"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link SensorIMU}. */ - public static SensorIMU createSensorIMU() { - SensorIMU connector = ModelFactory.eINSTANCE.createSensorIMU(); - connector.setName("IMU"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link SensorLaserRangeFinder}. */ - public static SensorLaserRangeFinder createSensorLaserRangeFinder() { - SensorLaserRangeFinder connector = ModelFactory.eINSTANCE.createSensorLaserRangeFinder(); - connector.setName("LaserRangeFinder"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link SensorLaserScanner}. */ - public static SensorLaserScanner createSensorLaserScanner() { - SensorLaserScanner connector = ModelFactory.eINSTANCE.createSensorLaserScanner(); - connector.setName("LaserScanner"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link ActuatorConnector}. */ - public static ActuatorConnector createActuatorConnector() { - ActuatorConnector connector = ModelFactory.eINSTANCE.createActuatorConnector(); - connector.setName("Sensor"); - createConnectorLayout(connector); - return connector; - } - - /** Creates a {@link ActuatorPWM}. */ - public static ActuatorPWM createActuatorPWM() { - ActuatorPWM connector = ModelFactory.eINSTANCE.createActuatorPWM(); - connector.setName("PWM"); - 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("Button2_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 ButtonR1}. */ - public static ButtonR1 createButtonR1() { - ButtonR1 button = GamepadFactory.eINSTANCE.createButtonR1(); - button.setName("ButtonR1"); - 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 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; - } - - /** Creates a {@link Right_StickY_Position}. */ - public static WheelEncoder createWheelEncoder() { - WheelEncoder wEncoder = ModelFactory.eINSTANCE.createWheelEncoder(); - wEncoder.setName("WheelEncoder"); - createConnectorLayout(wEncoder); - return wEncoder; - } - -}