diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF index bfe680f5d9f002e911d33a4a198af5c52969dc3a..9736b3ff68b53913d31a1463f1a8a85ca58d96b9 100644 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF @@ -16,8 +16,6 @@ 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.raspberry.compositor, org.fortiss.af3.platform.raspberry.model, - org.fortiss.af3.platform.raspberry.utils, org.fortiss.af3.platform.ui.editor, org.fortiss.af3.platform.utils diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPi3CompositorBase.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPi3CompositorBase.java deleted file mode 100644 index 728da933cdc0176483108add98ae3f2cd5ff93e2..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPi3CompositorBase.java +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.compose; - -import static org.fortiss.af3.platform.utils.PlatformArchitectureUtils.isMasterPort; -import static org.fortiss.af3.platform.utils.PlatformArchitectureUtils.isPlatformElement; - -import org.eclipse.emf.common.util.EList; -import org.fortiss.af3.platform.compose.base.hierarchical.elements.PlatformElementCompositorBase; -import org.fortiss.af3.platform.model.GenericPlatformUnit; -import org.fortiss.af3.platform.model.IArchitectureDomain; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public abstract class RaspberryPi3CompositorBase<T extends GenericPlatformUnit & IArchitectureDomain> - extends PlatformElementCompositorBase<T> { - - /** {@inheritDoc} */ - @Override - protected boolean canBeAddedAtCurrentLevel(IArchitectureDomain element) { - return isMasterPort(element); - } - - /** {@inheritDoc} */ - @Override - protected boolean canBeDroppedInto(IArchitectureDomain element) { - EList<Class<? extends IArchitectureDomain>> childDomains = - getPlatformCompositionRules().getAdmissibleChildDomains(getEditedObjectClass()); - if(childDomains.isEmpty()) { - return isPlatformElement(element); - } - for(Class<? extends IArchitectureDomain> domain : childDomains) { - if(domain.isAssignableFrom(element.getClass())) { - return isPlatformElement(element); - } - } - - return false; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPlatformArchitectureCompositor.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPlatformArchitectureCompositor.java deleted file mode 100644 index 8be63412f9ad8ea7a3767617e28079a979b23011..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/RaspberryPlatformArchitectureCompositor.java +++ /dev/null @@ -1,39 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.compose; - -import org.fortiss.af3.platform.compose.IPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.compose.base.hierarchical.PlatformArchitectureCompositorBase; -import org.fortiss.af3.platform.raspberry.compositor.RaspberryPlatformHierarchicalCompositionRules; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPlatformArchitectureCompositor extends PlatformArchitectureCompositorBase { - - /** {@inheritDoc} */ - @Override - public IPlatformHierarchicalCompositionRules getPlatformCompositionRules() { - return RaspberryPlatformHierarchicalCompositionRules.INSTANCE; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/CANBusCompositor.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/CANBusCompositor.java deleted file mode 100644 index c861230a607c403b609027b9f597db34419461ca..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/CANBusCompositor.java +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.compose.elements; - -import org.fortiss.af3.platform.compose.IPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.compose.base.hierarchical.elements.TransmissionUnitComponentCompositorBase; -import org.fortiss.af3.platform.model.IArchitectureDomain; -import org.fortiss.af3.platform.raspberry.compositor.RaspberryPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.raspberry.model.CANBus; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusCompositor extends TransmissionUnitComponentCompositorBase<CANBus> { - - /** {@inheritDoc} */ - @Override - public IPlatformHierarchicalCompositionRules getPlatformCompositionRules() { - return RaspberryPlatformHierarchicalCompositionRules.INSTANCE; - } - - /** {@inheritDoc} */ - @Override - protected Class<? extends IArchitectureDomain> getEditedObjectClass() { - return CANBus.class; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/RaspberryPi3Compositor.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/RaspberryPi3Compositor.java deleted file mode 100644 index ab215d500c9ad35484b7f14e1e9e5901aea74be3..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/compose/elements/RaspberryPi3Compositor.java +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.compose.elements; - -import org.fortiss.af3.platform.compose.IPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.model.IArchitectureDomain; -import org.fortiss.af3.platform.raspberry.compositor.RaspberryPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.raspberry.ui.compose.RaspberryPi3CompositorBase; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPi3Compositor extends RaspberryPi3CompositorBase<RaspberryPi3> { - - /** {@inheritDoc} */ - @Override - public IPlatformHierarchicalCompositionRules getPlatformCompositionRules() { - return RaspberryPlatformHierarchicalCompositionRules.INSTANCE; - } - - /** {@inheritDoc} */ - @Override - protected Class<? extends IArchitectureDomain> getEditedObjectClass() { - return RaspberryPi3.class; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/RaspberryPi3StructureEditor.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/RaspberryPi3StructureEditor.java deleted file mode 100644 index b81cde2e362c4792bee2520b5b4ffb0239ee3e96..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/RaspberryPi3StructureEditor.java +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.editor; - -import org.fortiss.af3.platform.compose.IPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.model.IArchitectureDomain; -import org.fortiss.af3.platform.raspberry.compositor.RaspberryPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.ui.editor.PlatformComponentStructureEditorBase; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPi3StructureEditor extends PlatformComponentStructureEditorBase<RaspberryPi3> { - - /** {@inheritDoc} */ - @Override - public IPlatformHierarchicalCompositionRules getPlatformCompositionRules() { - return RaspberryPlatformHierarchicalCompositionRules.INSTANCE; - } - - /** {@inheritDoc} */ - @Override - protected Class<? extends IArchitectureDomain> getEditedObjectClass() { - return RaspberryPi3.class; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/binding/RaspberryPi3StructureEditorBinding.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/binding/RaspberryPi3StructureEditorBinding.java deleted file mode 100644 index f2b2b97dc88c1eb78a48de5532c2401a6ffc9fa6..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/editor/binding/RaspberryPi3StructureEditorBinding.java +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.editor.binding; - -import org.eclipse.ui.IEditorPart; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.raspberry.ui.editor.RaspberryPi3StructureEditor; -import org.fortiss.af3.platform.ui.editor.PlatformComponentStructureEditorBindingBase; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPi3StructureEditorBinding extends - PlatformComponentStructureEditorBindingBase<RaspberryPi3> { - - /** {@inheritDoc} */ - @Override - public Class<? extends IEditorPart> getEditorClass(RaspberryPi3 raspberryPi3) { - return RaspberryPi3StructureEditor.class; - } - - /** {@inheritDoc} */ - @Override - public String getLabel(RaspberryPi3 raspberryPi3) { - return "RPi3 Structure"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CANBusHandler.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CANBusHandler.java deleted file mode 100644 index cb5b50bbb079af341a55072bb33aa8b6af54c670..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CANBusHandler.java +++ /dev/null @@ -1,38 +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 org.eclipse.jface.resource.ImageDescriptor; -import org.fortiss.af3.platform.raspberry.model.CANBus; -import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; -import org.fortiss.af3.platform.ui.handler.hierarchical.TransmissionUnitHandler; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class CANBusHandler extends TransmissionUnitHandler<CANBus> { - /** {@inheritDoc} */ - @Override - public ImageDescriptor getIconImageDescriptor() { - return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/can-logo.jpeg"); - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPI3Handler.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPI3Handler.java deleted file mode 100644 index f3633ca1e519d736ad20ea929c4886090808c97c..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPI3Handler.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.ui.handler; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; -import org.fortiss.af3.platform.ui.handler.hierarchical.GenericPlatformUnitHandler; - -/** - * - * @author eder - * @author $Author: hoelzl $ - * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPI3Handler extends GenericPlatformUnitHandler<RaspberryPi3> { - - /** {@inheritDoc} */ - @Override - public ImageDescriptor getIconImageDescriptor() { - return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/raspberry-pi-logo.png"); - } -} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototypes/PrototypeProvider.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototypes/PrototypeProvider.java deleted file mode 100644 index 84836fa5ae4af7eb159c51a760d29fba524c5913..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototypes/PrototypeProvider.java +++ /dev/null @@ -1,119 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.prototypes; - -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createActuator; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createActuatorOut; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createBusMasterInterface; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createBusMasterPort; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createCANBus; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createCANBusMasterInterface; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createCANBusMasterPort; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createRaspberryPi3; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createSensor; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryModelElementFactory.createSensorIn; -import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.setConnectorPosition; -import static org.fortiss.tooling.base.utils.LayoutDataUtils.setNodePosition; - -import org.fortiss.af3.platform.raspberry.model.Actuator; -import org.fortiss.af3.platform.raspberry.model.ActuatorOut; -import org.fortiss.af3.platform.raspberry.model.BusMasterInterface; -import org.fortiss.af3.platform.raspberry.model.BusMasterPort; -import org.fortiss.af3.platform.raspberry.model.CANBus; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterPort; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.raspberry.model.Sensor; -import org.fortiss.af3.platform.raspberry.model.SensorIn; -import org.fortiss.tooling.kernel.extension.base.PrototypeProviderBase; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class PrototypeProvider extends PrototypeProviderBase { - - /** Stores the category to display for these prototypes */ - protected final static String CATEGORY_NAME = "Raspberry Platform"; - - /** {@inheritDoc} */ - @Override - protected void registerPrototypes() { - setupRaspberryPlatform(); - } - - /** - * - */ - private void setupRaspberryPlatform() { - Actuator actuator = createActuator("Actuator"); - setNodePosition(actuator, 0, 0); - setConnectorPosition(actuator, 0, 0); - registerPrototype("Actuator", actuator, CATEGORY_NAME); - - ActuatorOut actuatorOut = createActuatorOut("ActuatorOut"); - setNodePosition(actuatorOut, 0, 0); - setConnectorPosition(actuator, 0, 0); - registerPrototype("ActuatorOut", actuatorOut, CATEGORY_NAME); - - BusMasterInterface busMasterInterface = createBusMasterInterface("BusMasterInterface"); - setNodePosition(busMasterInterface, 0, 0); - setConnectorPosition(busMasterInterface, 0, 0); - registerPrototype("BusMasterInterface", busMasterInterface, CATEGORY_NAME); - - BusMasterPort busMasterPort = createBusMasterPort("BusMasterPort"); - setNodePosition(busMasterPort, 0, 0); - setConnectorPosition(busMasterPort, 0, 0); - registerPrototype("BusMasterPort", busMasterPort, CATEGORY_NAME); - - CANBus canBus = createCANBus("CANBus"); - setNodePosition(canBus, 0, 0); - setConnectorPosition(canBus, 0, 0); - registerPrototype("CANBus", canBus, CATEGORY_NAME); - - CANBusMasterInterface canBusMasterInterface = - createCANBusMasterInterface("CANBusMasterInterface"); - setNodePosition(canBusMasterInterface, 0, 0); - setConnectorPosition(canBusMasterInterface, 0, 0); - registerPrototype("CANBusMasterInterface", canBusMasterInterface, CATEGORY_NAME); - - CANBusMasterPort canBusMasterPort = createCANBusMasterPort("CANBusMasterPort"); - setNodePosition(canBusMasterPort, 0, 0); - setConnectorPosition(canBusMasterPort, 0, 0); - registerPrototype("CANBusMasterPort", canBusMasterPort, CATEGORY_NAME); - - RaspberryPi3 raspberryPi3 = createRaspberryPi3("RaspberryPi3"); - setNodePosition(raspberryPi3, 0, 0); - setConnectorPosition(raspberryPi3, 0, 0); - registerPrototype("RaspberryPi3", raspberryPi3, CATEGORY_NAME); - - Sensor sensor = createSensor("Sensor"); - setNodePosition(sensor, 0, 0); - setConnectorPosition(sensor, 0, 0); - registerPrototype("Sensor", sensor, CATEGORY_NAME); - - SensorIn sensorIn = createSensorIn("SensorIn"); - setNodePosition(sensorIn, 0, 0); - setConnectorPosition(sensorIn, 0, 0); - registerPrototype("SensorIn", sensorIn, CATEGORY_NAME); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF index 5d41ba74eeb6c4dd98bfbf3c936f53af6b07d53b..6e9c4d69289062a4fc87964c94f5cb72e81499c6 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF @@ -10,25 +10,14 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-Activator: org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator Require-Bundle: org.fortiss.af3.project, - org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.xmi;visibility:=reexport, org.fortiss.tooling.kernel;visibility:=reexport, - org.fortiss.af3.platform;bundle-version="2.5.0";visibility:=reexport, - org.fortiss.tooling.base;visibility:=reexport, - org.fortiss.af3.expression, - org.eclipse.jface;bundle-version="3.9.1", - org.fortiss.af3.deployment, - org.fortiss.af3.component, - org.fortiss.af3.analyses -Export-Package: org.fortiss.af3.platform.raspberry.compositor, - org.fortiss.af3.platform.raspberry.model, + org.fortiss.af3.platform;bundle-version="2.5.0";visibility:=reexport +Export-Package: org.fortiss.af3.platform.raspberry.model, org.fortiss.af3.platform.raspberry.model.annotation, org.fortiss.af3.platform.raspberry.model.annotation.impl, org.fortiss.af3.platform.raspberry.model.annotation.util, org.fortiss.af3.platform.raspberry.model.impl, - org.fortiss.af3.platform.raspberry.model.util, - org.fortiss.af3.platform.raspberry.utils + org.fortiss.af3.platform.raspberry.model.util Import-Package: org.fortiss.af3.deployment.generator, org.fortiss.af3.platform.model diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/CoreAddressValueProvider.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/CoreAddressValueProvider.java deleted file mode 100644 index fb0b17f26d3bb9656509f35e7a189c323838b269..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/CoreAddressValueProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.valueprovider; - -import org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage; -import org.fortiss.af3.platform.raspberry.model.annotation.CoreAddress; -import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase; - -/** - * - * @author zverlov - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CoreAddressValueProvider extends EStructuralFeatureValueProviderBase<CoreAddress> { - - /** - * @param annotatedSpecificationEClass - */ - public CoreAddressValueProvider() { - super(AnnotationPackage.Literals.CORE_ADDRESS, - AnnotationPackage.Literals.CORE_ADDRESS__CORE_ADDRESS); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public String getAnnotationName(CoreAddress specification) { - // TODO Auto-generated method stub - return "Core Address"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PeripheralAddressValueProvider.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PeripheralAddressValueProvider.java deleted file mode 100644 index a77511100381de62dbb4bdbf7cc08fc8d5a65646..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PeripheralAddressValueProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.valueprovider; - -import org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage; -import org.fortiss.af3.platform.raspberry.model.annotation.PeripheralAddress; -import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase; - -/** - * - * @author zverlov - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class PeripheralAddressValueProvider extends - EStructuralFeatureValueProviderBase<PeripheralAddress> { - - /** - * - */ - public PeripheralAddressValueProvider() { - super(AnnotationPackage.Literals.PERIPHERAL_ADDRESS, - AnnotationPackage.Literals.PERIPHERAL_ADDRESS__PERIPHERAL_ADDRESS); - } - - /** {@inheritDoc} */ - @Override - public String getAnnotationName(PeripheralAddress specification) { - return "Peripheral Address"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PinNumberValueProvider.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PinNumberValueProvider.java deleted file mode 100644 index 5e4789002ac8ff4b00659aa90e656cc267092f00..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/annotation/valueprovider/PinNumberValueProvider.java +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.valueprovider; - -import org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage; -import org.fortiss.af3.platform.raspberry.model.annotation.PinNumber; -import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase; - -/** - * - * @author zverlov - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class PinNumberValueProvider extends EStructuralFeatureValueProviderBase<PinNumber> { - - /** - * @param annotatedSpecificationEClass - */ - public PinNumberValueProvider() { - super(AnnotationPackage.Literals.PIN_NUMBER, - AnnotationPackage.Literals.PIN_NUMBER__PIN_NUMBER); - } - - /** {@inheritDoc} */ - @Override - public String getAnnotationName(PinNumber specification) { - return "Pin Number"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compositor/RaspberryPlatformHierarchicalCompositionRules.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compositor/RaspberryPlatformHierarchicalCompositionRules.java deleted file mode 100644 index c7ed3e083296e1661acd7968779bdb6f8761a7f4..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compositor/RaspberryPlatformHierarchicalCompositionRules.java +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.compositor; - -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.fortiss.af3.platform.compose.IPlatformHierarchicalCompositionRules; -import org.fortiss.af3.platform.compose.PlatformHierarchicalCompositionRulesBase; -import org.fortiss.af3.platform.model.IArchitectureDomain; -import org.fortiss.af3.platform.model.IPlatformDomain; -import org.fortiss.af3.platform.raspberry.model.IBoardDomain; -import org.fortiss.af3.platform.raspberry.model.IProcessorDomain; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPlatformHierarchicalCompositionRules extends - PlatformHierarchicalCompositionRulesBase { - - /** Singleton pattern. */ - public static IPlatformHierarchicalCompositionRules INSTANCE = - new RaspberryPlatformHierarchicalCompositionRules(); - - /** {@inheritDoc} */ - @Override - public EList<Class<? extends IArchitectureDomain>> getAdmissibleChildDomains( - Class<? extends IArchitectureDomain> domain) { - EList<Class<? extends IArchitectureDomain>> rval = - new BasicEList<Class<? extends IArchitectureDomain>>(); - - if(domain.equals(IPlatformDomain.class)) { - rval.add(IBoardDomain.class); - } else if(hasEqualLevel(domain, IBoardDomain.class)) { - rval.add(IProcessorDomain.class); - } - return rval; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorExecutable.java deleted file mode 100644 index 86405b3742c8dd31ee483e0f791487f8031a0d34..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorExecutable.java +++ /dev/null @@ -1,74 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.IWritableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.TransmitterExecutableBase; -import org.fortiss.af3.platform.raspberry.model.Actuator; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorExecutable extends TransmitterExecutableBase<Actuator> implements - IInitializableExecutable, ITerminatableExecutable, IWritableExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public ActuatorExecutable(Actuator modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorOutExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorOutExecutable.java deleted file mode 100644 index e98807f884f13d907102e847e432b93708e22d8d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/ActuatorOutExecutable.java +++ /dev/null @@ -1,140 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.createVar; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.af3.platform.raspberry.utils.RaspberryUtils.funcCallMultipleArgs; -import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotation; - -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.TransmitterExecutableBase; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.ITermExecutable; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.IWriteExecutableWithNoValSupport; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.InitExecutable; -import org.fortiss.af3.platform.raspberry.model.ActuatorOut; -import org.fortiss.af3.platform.raspberry.model.annotation.PeripheralAddress; -import org.fortiss.af3.platform.raspberry.model.annotation.PinNumber; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorOutExecutable extends TransmitterExecutableBase<ActuatorOut> implements - InitExecutable, ITermExecutable, IWriteExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public ActuatorOutExecutable(ActuatorOut modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - String actuatorId = "ActuatorOut_ID_" + modelElement.getId();// modelElement.getName() - return funcCall("init_Actuator", createVar(actuatorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - String actuatorId = "ActuatorOut_ID_" + modelElement.getId(); - return funcCall("term_Actuator", createVar(actuatorId)); - } - - /** {@inheritDoc} */ - @Override - /* generates call: write_Actuator(id, pinNr, address) */ - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - return funcCallMultipleArgs("write_Actuator", createVar("Id"), createVar("pinNr"), - createVar("address")); - - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - return funcCall("set_noval_Actuator"); - } - - /** {@inheritDoc} */ - @Override - /* generates call: write_Actuator(id, pinNr, address) */ - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value, - Deployment depl) { - String actuatorId = "ActuatorOut_ID_" + modelElement.getId();// modelElement.getName() - String val = logicalSignal.getName() + "_ID_" + logicalSignal.getId(); - return funcCall("write_Actuator", createVar(actuatorId), createVar(val)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(IExpressionTerm signal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(Deployment depl) { - // TODO Auto-generated method stub - String actuatorId = "ActuatorOut_ID_" + modelElement.getId(); - return funcCall("term_Actuator", createVar(actuatorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm term) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm port, IExpressionTerm portName, - IExpressionTerm readOrWrite) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(Deployment depl) { - String actuatorId = "ActuatorOut_ID_" + modelElement.getId();// modelElement.getName() - return funcCall("init_Actuator", createVar(actuatorId)); - } - - /** Get PinNr, Address and ID of an Actuator. */ - public String getActuatorDetails() { - PinNumber ias = getAnnotation(modelElement, PinNumber.class); - int pinNr = ias.getPinNumber(); - PeripheralAddress pa = getAnnotation(modelElement, PeripheralAddress.class); - int actuatorAddress = pa.getPeripheralAddress(); - int actuatorId = modelElement.getId(); - return "{" + actuatorId + ", " + pinNr + ", " + actuatorAddress + "} \n"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterInterfaceExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterInterfaceExecutable.java deleted file mode 100644 index c48cf6c77136ae198a78225591a7f551b67a336b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterInterfaceExecutable.java +++ /dev/null @@ -1,91 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.IReadableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.IWritableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.TransceiverExecutableBase; -import org.fortiss.af3.platform.raspberry.model.BusMasterInterface; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterInterfaceExecutable extends TransceiverExecutableBase<BusMasterInterface> - implements IInitializableExecutable, ITerminatableExecutable, - IReadableExecutableWithNoValSupport, IWritableExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public BusMasterInterfaceExecutable(BusMasterInterface modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterPortExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterPortExecutable.java deleted file mode 100644 index 0e3f1e9797ee64c31797cc5ef9e7388dc1448daf..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/BusMasterPortExecutable.java +++ /dev/null @@ -1,189 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.deployment.utils.DeploymentUtils.findECUforDeployedComponent; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.createVar; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotation; - -import org.eclipse.emf.common.util.EList; -import org.fortiss.af3.component.model.Channel; -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.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.TransceiverExecutableBase; -import org.fortiss.af3.platform.model.ExecutionUnit; -import org.fortiss.af3.platform.model.IPlatformArchitectureElement; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.IReadExecutableWithNoValSupport; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.ITermExecutable; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.IWriteExecutableWithNoValSupport; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.InitExecutable; -import org.fortiss.af3.platform.raspberry.model.BusMasterPort; -import org.fortiss.af3.platform.raspberry.model.annotation.CoreAddress; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterPortExecutable extends TransceiverExecutableBase<BusMasterPort> implements - InitExecutable, ITermExecutable, IReadExecutableWithNoValSupport, - IWriteExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public BusMasterPortExecutable(BusMasterPort modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(Deployment depl) { - int currentCoreAddress = getParentCoreAddress(); - return funcCall("init_BusMasterPort", createVar(currentCoreAddress + ""));// + - // modelElement.getName() - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(Deployment depl) { - int currentCoreAddress = getParentCoreAddress(); - return funcCall("term_BusMasterPort", createVar(currentCoreAddress + "")); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value, - Deployment depl) { - int coreAddress = getTargetCoreAddress(logicalSignal, depl); - String signalId = logicalSignal.getName() + "_ID_" + logicalSignal.getId(); - return funcCall("write_BusMasterPort", createVar(coreAddress + ""), createVar(signalId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal, Deployment depl) { - Port sourceSignal = getSourceSignal(logicalSignal); - String signalId = sourceSignal.getName() + "_ID_" + sourceSignal.getId(); - return funcCall("read_BusMasterPort", createVar(signalId)); - - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - return funcCall("set_noval_BusMasterPort"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("is_noval_BusMasterPort"); - } - - /** Get source signal for the current port */ - private Port getSourceSignal(InputPort logicalSignal) { - EList<Channel> channels = logicalSignal.getIncomingChannels(); - // get one of the channels, usually only one channel will be connected per input port - Port sourceSignal = channels.get(0).getSource(); - return sourceSignal; - } - - /** Gets the address for the core that acts as sink for the Output Port */ - private int getTargetCoreAddress(OutputPort logicalSignal, Deployment depl) { - EList<Channel> channels = logicalSignal.getOutgoingChannels(); - // get one of the channels, usually only one channel will be connected per output port - Component targetComponent = channels.get(0).getTarget().getComponent(); - ExecutionUnit targetCore = findECUforDeployedComponent(targetComponent, depl); - CoreAddress ias = getAnnotation(targetCore, CoreAddress.class); - return ias.getCoreAddress(); - } - - /** Get core address the modelElement is deployed on */ - private int getParentCoreAddress() { - IPlatformArchitectureElement parentElement = modelElement.getPlatformElement(); - CoreAddress ias = getAnnotation(parentElement, CoreAddress.class); - return ias.getCoreAddress(); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(IExpressionTerm signal, IExpressionTerm buffer) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return funcCall("term_BusMasterPort"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return funcCall("init_BusMasterPort"); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(IExpressionTerm signal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm term) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm port, IExpressionTerm portName, - IExpressionTerm readOrWrite) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusExecutable.java deleted file mode 100644 index ef1016d564b4c2ecc2e824d8bec645bb179591a9..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusExecutable.java +++ /dev/null @@ -1,53 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusExecutable extends TransmissionUnitExecutableBase<TransmissionUnit> { - - /** - * @param modelElement - */ - public CANBusExecutable(TransmissionUnit modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public void createAllFiles(SourcePackage pack, Map<ExecutionUnit, List<Port>> euPortsPair, - Map<ExecutionUnit, List<Component>> euComponentList, Component topComponent, - int deploymentID) { - } -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterInterfaceExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterInterfaceExecutable.java deleted file mode 100644 index d62b0a89795128dab93423d7ea764e7d904a316f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterInterfaceExecutable.java +++ /dev/null @@ -1,92 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.IReadableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.IWritableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.TransceiverExecutableBase; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterInterfaceExecutable extends - TransceiverExecutableBase<CANBusMasterInterface> implements IInitializableExecutable, - ITerminatableExecutable, IReadableExecutableWithNoValSupport, - IWritableExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public CANBusMasterInterfaceExecutable(CANBusMasterInterface modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterPortExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterPortExecutable.java deleted file mode 100644 index 2c6ec079ed9f16c4d76ada5eca69c13088494635..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CANBusMasterPortExecutable.java +++ /dev/null @@ -1,91 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.IReadableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.IWritableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.TransceiverExecutableBase; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterPort; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterPortExecutable extends TransceiverExecutableBase<CANBusMasterPort> - implements IInitializableExecutable, ITerminatableExecutable, - IReadableExecutableWithNoValSupport, IWritableExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public CANBusMasterPortExecutable(CANBusMasterPort modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPi3Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPi3Executable.java deleted file mode 100644 index a73b2105b149119110854bc3fc7a7ef2dcab291d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/RaspberryPi3Executable.java +++ /dev/null @@ -1,40 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.language.executable.GenericPlatformUnitExecutableBase; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPi3Executable extends GenericPlatformUnitExecutableBase<RaspberryPi3> { - - /** - * @param modelElement - */ - public RaspberryPi3Executable(RaspberryPi3 modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorExecutable.java deleted file mode 100644 index 3b1a834ff87df6967411d96c6a10a386c2019640..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorExecutable.java +++ /dev/null @@ -1,74 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.language.executable.IInitializableExecutable; -import org.fortiss.af3.platform.language.executable.IReadableExecutableWithNoValSupport; -import org.fortiss.af3.platform.language.executable.ITerminatableExecutable; -import org.fortiss.af3.platform.language.executable.ReceiverExecutableBase; -import org.fortiss.af3.platform.raspberry.model.Sensor; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorExecutable extends ReceiverExecutableBase<Sensor> implements - IInitializableExecutable, ITerminatableExecutable, IReadableExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public SensorExecutable(Sensor modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorInExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorInExecutable.java deleted file mode 100644 index 8bcd77911d7645318496f06f0e3a2f654499f807..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/SensorInExecutable.java +++ /dev/null @@ -1,149 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.createVar; -import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.funcCall; -import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotation; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.platform.language.executable.ReceiverExecutableBase; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.IReadExecutableWithNoValSupport; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.ITermExecutable; -import org.fortiss.af3.platform.raspberry.generator.executable.interfaces.InitExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorIn; -import org.fortiss.af3.platform.raspberry.model.annotation.PeripheralAddress; -import org.fortiss.af3.platform.raspberry.model.annotation.PinNumber; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorInExecutable extends ReceiverExecutableBase<SensorIn> implements InitExecutable, - ITermExecutable, IReadExecutableWithNoValSupport { - - /** - * @param modelElement - */ - public SensorInExecutable(SensorIn modelElement) { - super(modelElement); - // TODO Auto-generated constructor stub - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization() { - String sensorId = "SensorIn_ID_" + modelElement.getId();// modelElement.getName() + - return funcCall("init_Sensor", createVar(sensorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination() { - String sensorId = "SensorIn_ID_" + modelElement.getId(); - return funcCall("term_Sensor", createVar(sensorId)); - } - - /** {@inheritDoc} */ - @Override - /* generates call: read_Sensor(pinNr, varName) */ - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { - // PinNumber ias = getAnnotation(modelElement, PinNumber.class); - // int pinNr = ias.getPinNumber(); - String sensorId = "SensorIn_ID_" + modelElement.getId(); - String fcnName = "read_Sensor"; - return funcCall(fcnName, createVar(sensorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { - return funcCall("is_noval_Sensor"); - } - - /** {@inheritDoc} */ - @Override - /* generates call: read_Sensor(id, pinNr, address) */ - public IExpressionTerm getValueReadAccessor(InputPort logicalSignal, Deployment depl) { - String sensorId = "SensorIn_ID_" + modelElement.getId(); - String fcnName = "read_Sensor"; - return funcCall(fcnName, createVar(sensorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getNoValGuardAccessor(IExpressionTerm signal, IExpressionTerm buffer) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(IExpressionTerm signal) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getTermination(Deployment depl) { - // TODO Auto-generated method stub - String sensorId = "SensorIn_ID_" + modelElement.getId(); - return funcCall("term_Sensor", createVar(sensorId)); - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm term) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(IExpressionTerm port, IExpressionTerm portName, - IExpressionTerm readOrWrite) { - // TODO Auto-generated method stub - return null; - } - - /** {@inheritDoc} */ - @Override - public IExpressionTerm getInitialization(Deployment depl) { - // TODO Auto-generated method stub - String sensorId = "SensorIn_ID_" + modelElement.getId(); - return funcCall("init_Sensor", createVar(sensorId)); - } - - /** Get PinNr, Address and ID of a sensor. */ - - public String getSensorDetails() { - PinNumber ias = getAnnotation(modelElement, PinNumber.class); - int pinNr = ias.getPinNumber(); - PeripheralAddress pa = getAnnotation(modelElement, PeripheralAddress.class); - int sensorAddress = pa.getPeripheralAddress(); - int sensorId = modelElement.getId(); - return "{" + sensorId + ", " + pinNr + ", " + sensorAddress + "} \n"; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutable.java deleted file mode 100644 index 4733385c9487874c14d0af29c35fe6f40a6ead1a..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutable.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.fortiss.af3.platform.raspberry.generator.executable.interfaces; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface for platform-specific executables, which support reading of a - * non-null value. - * - * @author zverlov - * @author $Author: zverlov $ - * @version $Rev: 3134 $ - * @ConQAT.Rating GREEN Hash: 9FCAD4E527DAF1B2A47B5FB0B252F468 - */ -public interface IReadExecutable { - - /** - * Returns a read access term to this executable for the given port's value. - */ - - IExpressionTerm getValueReadAccessor(InputPort logicalSignal, Deployment depl); - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutableWithNoValSupport.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutableWithNoValSupport.java deleted file mode 100644 index f1f86e48382d5e4cc1287cb5659a836253714fc4..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IReadExecutableWithNoValSupport.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.fortiss.af3.platform.raspberry.generator.executable.interfaces; - -import org.fortiss.af3.component.model.InputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface for platform-specific executables, which also support reading of <code>null</code> - * values. - * - * @author zverlov - * @author $Author: zverlov $ - * @version $Rev: 5274 $ - * @ConQAT.Rating GREEN Hash: C508B83AB8E3F78306F62115213C7B5B - */ -public interface IReadExecutableWithNoValSupport extends IReadExecutable { - - /** - * Returns the read access term to the platform-specific executable's <code>null</code> value - * guard. - */ - IExpressionTerm getNoValGuardAccessor(IExpressionTerm signal, IExpressionTerm buffer); - - /** - * @param p - * @return - */ - IExpressionTerm getNoValGuardAccessor(InputPort p); -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/ITermExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/ITermExecutable.java deleted file mode 100644 index 3a36ec75214fadc49f73db3a03979bfeffd27f5a..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/ITermExecutable.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.fortiss.af3.platform.raspberry.generator.executable.interfaces; - -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface implemented by platform-specific executables, which need - * termination when system goes down. - * - * @author zverlov - * @author $Author: zverlov $ - * @version $Rev: 4114 $ - * @ConQAT.Rating GREEN Hash: 9CD3B3AB64293053C6EE40AEED83A686 - */ -public interface ITermExecutable { - - /** - * Returns an termination term of the platform-specific executable. Usually - * a function call to the hardware abstraction layer is returned here. - */ - public abstract IExpressionTerm getTermination(IExpressionTerm signal); - - /** - * @param depl - * @return - */ - IExpressionTerm getTermination(Deployment depl); - - /** - * @return - */ - IExpressionTerm getTermination(); -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutable.java deleted file mode 100644 index 42fbab381f9eb84e84f859fe394798b46edfc126..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutable.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.fortiss.af3.platform.raspberry.generator.executable.interfaces; - -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface for platform-specific executables, which support writing of a - * non-null value. - * - * @author zverlov - * @author $Author: zverlov $ - * @version $Rev: 5274 $ - * @ConQAT.Rating YELLOW Hash: 5F918B896286A3F5A3B240C3917B2A45 - */ -public interface IWriteExecutable { - - /** - * Returns a write access term to this executable for the given value and - * output port. - */ - /* IExpressionTerm getValueWriteAccessor(IExpressionTerm signal, IExpressionTerm port); */ - - /** - * Returns a Write Accessor. - */ - /* - * IExpressionTerm getValueWriteAccessor(IExpressionTerm signal, IExpressionTerm port, - * IExpressionTerm pin, ActuatorType_t actuatorType); - */ - - /** - * @param logicalSignal - * @param value - * @param depl - * @return - */ - IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value, - Deployment depl); -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutableWithNoValSupport.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutableWithNoValSupport.java deleted file mode 100644 index 1afa2e0b7681bf1dd3f6a3469f54b1f456e8921f..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/IWriteExecutableWithNoValSupport.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.fortiss.af3.platform.raspberry.generator.executable.interfaces; - -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface for platform-specific executables, which also support writing of <code>null</code> - * values. - * - * @author zverlov - * @author $Author: zverlov $ - * @version $Rev: 5274 $ - * @ConQAT.Rating GREEN Hash: EE592DF39E033B60DBBFC8EF071A43C3 - */ -public interface IWriteExecutableWithNoValSupport extends IWriteExecutable { - - /** - * Returns a write access term to this executable for the given output port. - */ - IExpressionTerm getNoValWriteAccessor(OutputPort p); -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/InitExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/InitExecutable.java deleted file mode 100644 index 00f9d30012a7faa48905caffe458a41f5005391d..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/interfaces/InitExecutable.java +++ /dev/null @@ -1,68 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: PikeosPartitionExecutable.java 10808 2014-05-27 09:00:26Z zverlov $ -| | -| Copyright 2014 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.interfaces; - -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; - -/** - * Interface implemented by platform-specific executables, which need - * initialization during system start-up. - * - * @author chaudhary - * @author $Author: chaudhary $ - * @version $Rev: 10810 $ - * @ConQAT.Rating GREEN Hash: E1C77D8E8AD1D2AA9F058E3034D6B88E - */ -public interface InitExecutable { - - /** - * Returns the expression term for ports initialization. - * - * @param term - * the expression term - * @return expression term for ports initialization - */ - public abstract IExpressionTerm getInitialization(IExpressionTerm term); - - /** - * Returns the expression term for ports initialization. - * - * @param port - * the port which needs to be initialized - * @param portName - * name of the port - * @param readOrWrite - * input or output port - * @return expression term for ports initialization - */ - public abstract IExpressionTerm getInitialization(IExpressionTerm port, - IExpressionTerm portName, IExpressionTerm readOrWrite); - - /** - * @param depl - * @return - */ - IExpressionTerm getInitialization(Deployment depl); - - /** - * @return - */ - IExpressionTerm getInitialization(); -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransformation.java deleted file mode 100644 index 23ccf62fdf8795e03a6d7c3dcb0b3d6cc585a8ae..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.ActuatorExecutable; -import org.fortiss.af3.platform.raspberry.model.Actuator; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ActuatorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Actuator.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Actuator; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ActuatorExecutable((Actuator)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransmissionCatalogTransformation.java deleted file mode 100644 index 113f89dbed94aa506b9d7be008d0d4d42ae96a32..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorExecutableTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.Actuator; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorExecutableTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Actuator.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Actuator; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransformation.java deleted file mode 100644 index 429785d74f0e3068680dd0cd5556668c36adf341..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.ActuatorOutExecutable; -import org.fortiss.af3.platform.raspberry.model.ActuatorOut; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorOutExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return ActuatorOutExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ActuatorOut.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ActuatorOut; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new ActuatorOutExecutable((ActuatorOut)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransmissionCatalogTransformation.java deleted file mode 100644 index 9cf988c4552c754f40499294ee84cd2328be72be..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/ActuatorOutExecutableTransmissionCatalogTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.ActuatorOut; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class ActuatorOutExecutableTransmissionCatalogTransformation implements - ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return ActuatorOut.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof ActuatorOut; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceExecutableTransformation.java deleted file mode 100644 index c762bcb290c02016a97c6b0017d346a378b671fa..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.BusMasterInterfaceExecutable; -import org.fortiss.af3.platform.raspberry.model.BusMasterInterface; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterInterfaceExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return BusMasterInterfaceExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return BusMasterInterface.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof BusMasterInterface; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new BusMasterInterfaceExecutable((BusMasterInterface)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceTransmissionCatalogTransformation.java deleted file mode 100644 index 51075efdba83d766d38466a9b7d143048d73c8fc..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterInterfaceTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.BusMasterInterface; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterInterfaceTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return BusMasterInterface.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof BusMasterInterface; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortExecutableTransformation.java deleted file mode 100644 index 05ee96d1b9325768c412fe3b22b6a710641836fd..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.BusMasterPortExecutable; -import org.fortiss.af3.platform.raspberry.model.BusMasterPort; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterPortExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return BusMasterPortExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return BusMasterPort.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof BusMasterPort; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new BusMasterPortExecutable((BusMasterPort)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortTransmissionCatalogTransformation.java deleted file mode 100644 index 32df2a78957c5c05cf7f260fd31e4a461e864a5b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/BusMasterPortTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.BusMasterPort; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class BusMasterPortTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return BusMasterPort.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof BusMasterPort; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusExecutableTransformation.java deleted file mode 100644 index 5072cc78d3e2173d8a8bf86e8e551e3ad0e0d24b..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusExecutableTransformation 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/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceExecutableTransformation.java deleted file mode 100644 index 84e0b741737992d46aa3362d0f792a8f7bf5e056..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.CANBusMasterInterfaceExecutable; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterInterfaceExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CANBusMasterInterfaceExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CANBusMasterInterface.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CANBusMasterInterface; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CANBusMasterInterfaceExecutable((CANBusMasterInterface)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceTransmissionCatalogTransformation.java deleted file mode 100644 index 2f1e56ec69d602e595f04623301b29fe834dd103..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterInterfaceTransmissionCatalogTransformation.java +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.CANBusMasterInterface; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterInterfaceTransmissionCatalogTransformation implements - ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CANBusMasterInterface.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CANBusMasterInterface; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortExecutableTransformation.java deleted file mode 100644 index 375c306850dfb4a15e370361baefaa8a056493c0..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.CANBusMasterPortExecutable; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterPort; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterPortExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return CANBusMasterPortExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CANBusMasterPort.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CANBusMasterPort; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new CANBusMasterPortExecutable((CANBusMasterPort)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortTransmissionCatalogTransformation.java deleted file mode 100644 index 2e85212b53754b7936b00d948165b22e36b26e22..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusMasterPortTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.CANBusMasterPort; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusMasterPortTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return CANBusMasterPort.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof CANBusMasterPort; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusTransmissionCatalogTransformation.java deleted file mode 100644 index 40554b36cfa0def37693775a8e8cb5cb84601b86..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/CANBusTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.CANBus; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class CANBusTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.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 TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPi3ExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPi3ExecutableTransformation.java deleted file mode 100644 index 212fefcfd044b2aefe8b92da3fb42f949d31da31..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/RaspberryPi3ExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.RaspberryPi3Executable; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryPi3ExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return RaspberryPi3Executable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return RaspberryPi3.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof RaspberryPi3; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new RaspberryPi3Executable((RaspberryPi3)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransformation.java deleted file mode 100644 index 8d74a527029156ee2d62a02db7a59e44f598e505..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.SensorExecutable; -import org.fortiss.af3.platform.raspberry.model.Sensor; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return SensorExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Sensor.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Sensor; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new SensorExecutable((Sensor)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransmissionCatalogTransformation.java deleted file mode 100644 index 61ba12677c202d48684a6fc83ebbcb55ef003563..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorExecutableTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.Sensor; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorExecutableTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return Sensor.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof Sensor; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransformation.java deleted file mode 100644 index 740dd2b69c0d48422e13ac7ee007c5c030d22437..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.SensorInExecutable; -import org.fortiss.af3.platform.raspberry.model.SensorIn; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorInExecutableTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return SensorInExecutable.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorIn.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorIn; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new SensorInExecutable((SensorIn)source); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransmissionCatalogTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransmissionCatalogTransformation.java deleted file mode 100644 index f88fde02ed64b4be65f1335048d90308b432df63..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/SensorInExecutableTransmissionCatalogTransformation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.raspberry.model.SensorIn; -import org.fortiss.tooling.kernel.extension.ITransformationProvider; -import org.fortiss.tooling.kernel.extension.data.ITransformationContext; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class SensorInExecutableTransmissionCatalogTransformation implements ITransformationProvider { - - /** {@inheritDoc} */ - @Override - public Class<?> getTargetClass() { - return TransmissionCatalog.class; - } - - /** {@inheritDoc} */ - @Override - public boolean - canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { - return SensorIn.class.isAssignableFrom(sourceClass); - } - - /** {@inheritDoc} */ - @Override - public boolean canTransform(Object source, ITransformationContext context) { - return source instanceof SensorIn; - } - - /** {@inheritDoc} */ - @Override - public Object transform(Object source, ITransformationContext context) { - return new TransmissionCatalog(); - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java deleted file mode 100644 index 6cbf4c7954f4bcd6ce26743f5e7ac8590cb17353..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.utils; - -import org.fortiss.af3.platform.raspberry.model.Actuator; -import org.fortiss.af3.platform.raspberry.model.ActuatorOut; -import org.fortiss.af3.platform.raspberry.model.BusMasterInterface; -import org.fortiss.af3.platform.raspberry.model.BusMasterPort; -import org.fortiss.af3.platform.raspberry.model.CANBus; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface; -import org.fortiss.af3.platform.raspberry.model.CANBusMasterPort; -import org.fortiss.af3.platform.raspberry.model.ModelFactory; -import org.fortiss.af3.platform.raspberry.model.RaspberryPi3; -import org.fortiss.af3.platform.raspberry.model.Sensor; -import org.fortiss.af3.platform.raspberry.model.SensorIn; -import org.fortiss.tooling.base.utils.LayoutModelElementFactory; - -/** - * - * @author chaudhary - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryModelElementFactory { - - public static CANBusMasterPort createCANBusMasterPort(String name) { - CANBusMasterPort canBusMasterPort = ModelFactory.eINSTANCE.createCANBusMasterPort(); - canBusMasterPort.setName(name); - LayoutModelElementFactory.createConnectorLayout(canBusMasterPort); - return canBusMasterPort; - } - - public static CANBusMasterInterface createCANBusMasterInterface(String name) { - CANBusMasterInterface canBusMasterInterface = - ModelFactory.eINSTANCE.createCANBusMasterInterface(); - canBusMasterInterface.setName(name); - LayoutModelElementFactory.createConnectorLayout(canBusMasterInterface); - return canBusMasterInterface; - } - - public static BusMasterPort createBusMasterPort(String name) { - BusMasterPort busMasterPort = ModelFactory.eINSTANCE.createBusMasterPort(); - busMasterPort.setName(name); - LayoutModelElementFactory.createConnectorLayout(busMasterPort); - return busMasterPort; - } - - public static BusMasterInterface createBusMasterInterface(String name) { - BusMasterInterface busMasterInterface = ModelFactory.eINSTANCE.createBusMasterInterface(); - busMasterInterface.setName(name); - LayoutModelElementFactory.createConnectorLayout(busMasterInterface); - return busMasterInterface; - } - - /** Creates a Hardware Board. */ - public static RaspberryPi3 createRaspberryPi3(String name) { - RaspberryPi3 raspberryPi3 = ModelFactory.eINSTANCE.createRaspberryPi3(); - raspberryPi3.setName(name); - LayoutModelElementFactory.createNodeElementLayout(raspberryPi3); - return raspberryPi3; - } - - /** Creates a Bus with a given name. */ - public static CANBus createCANBus(String name) { - CANBus canBus = ModelFactory.eINSTANCE.createCANBus(); - canBus.setName(name); - LayoutModelElementFactory.createConnectionLayout(canBus); - return canBus; - } - - public static Sensor createSensor(String name) { - Sensor sensor = ModelFactory.eINSTANCE.createSensor(); - sensor.setName(name); - LayoutModelElementFactory.createNodeElementLayout(sensor); - return sensor; - } - - public static SensorIn createSensorIn(String name) { - SensorIn sensorIn = ModelFactory.eINSTANCE.createSensorIn(); - sensorIn.setName(name); - LayoutModelElementFactory.createNodeElementLayout(sensorIn); - return sensorIn; - } - - public static Actuator createActuator(String name) { - Actuator actuator = ModelFactory.eINSTANCE.createActuator(); - actuator.setName(name); - LayoutModelElementFactory.createNodeElementLayout(actuator); - return actuator; - } - - public static ActuatorOut createActuatorOut(String name) { - ActuatorOut actuatorOut = ModelFactory.eINSTANCE.createActuatorOut(); - actuatorOut.setName(name); - LayoutModelElementFactory.createNodeElementLayout(actuatorOut); - return actuatorOut; - } - -} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryUtils.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryUtils.java deleted file mode 100644 index 65b3559e09321c15fa1600b030c9a7e364e1d869..0000000000000000000000000000000000000000 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryUtils.java +++ /dev/null @@ -1,68 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id$ -| | -| Copyright 2016 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.utils; - -import java.util.ArrayList; -import java.util.List; - -import org.fortiss.af3.component.model.Channel; -import org.fortiss.af3.component.model.Component; -import org.fortiss.af3.component.model.OutputPort; -import org.fortiss.af3.deployment.model.ComponentAllocation; -import org.fortiss.af3.deployment.model.Deployment; -import org.fortiss.af3.expression.model.terms.IExpressionTerm; -import org.fortiss.af3.expression.model.terms.impl.FunctionCallStaticImpl; -import org.fortiss.af3.expression.model.terms.impl.UserdefinedFunctionStaticImpl; -import org.fortiss.af3.platform.model.ExecutionUnit; -import org.fortiss.af3.project.model.typesystem.IFunction; - -/** - * - * @author zverlov - * @author $Author$ - * @version $Rev$ - * @ConQAT.Rating RED Hash: - */ -public class RaspberryUtils { - /** Return the target @{link {@link Component} of the an {@link OutputPort}. */ - public static List<Component> getTargetComponent(OutputPort out) { - ArrayList<Component> result = new ArrayList<Component>(); - for(Channel chan : out.getOutgoingChannels()) { - result.add(chan.getTarget().getComponent()); - } - return result; - } - - /** Returns the @{link {@link ExecutionUnit} where a @{link {@link Component} is deployed. */ - public static ExecutionUnit getEcuForComponent(Component c1, Deployment deploy) { - for(ComponentAllocation allocaitons : deploy.getComponentAllocations()) { - if(allocaitons.getComponent() == c1) { - return allocaitons.getExecutionUnit(); - } - } - - return null; - } - - /** Generates a function call for more than two arguments */ - public static IExpressionTerm funcCallMultipleArgs(String funcName, IExpressionTerm arg0, - IExpressionTerm arg1, IExpressionTerm arg2) { - IFunction fun = UserdefinedFunctionStaticImpl.create(funcName); - return FunctionCallStaticImpl.create(fun, arg0, arg1, arg2); - } -}