diff --git a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml index 57788801e0757ccee9821a19a4f8597ecd114bd8..3967d841502664be3a389e515719564af01c2510 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml +++ b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml @@ -193,6 +193,188 @@ </objectClass> </target> </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.GPITransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.GPI"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.GPIExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.GPOTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.GPO"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.GPOExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button1Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button1"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button2Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button2"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button3Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button3"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Button4Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Button4"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonL1Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonL2Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonR1Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.ButtonR2Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Left_StickXTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Left_StickYTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Right_StickXTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.gamepad.Right_StickYTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickYExecutable"> + </objectClass> + </target> + </transformationProvider> </extension> diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..dd8ed0eff5a34fbccbed6bae6f0ad8ae1cbdd60b --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPIExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.GPI; + +/** + * Executable for {@link GPI}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class GPIExecutable extends GenericReceiverExecutable { + + /** Constructor. */ + public GPIExecutable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..299463791429845d4d74f91a31f217980ec0705b --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/GPOExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable; + +import org.fortiss.af3.component.model.OutputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericTransmitterExecutable; +import org.fortiss.af3.platform.model.generic.GenericTransmitter; +import org.fortiss.af3.platform.raspberry.model.GPO; + +/** + * Executable for {@link GPO}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class GPOExecutable extends GenericTransmitterExecutable { + + /** Constructor. */ + public GPOExecutable(GenericTransmitter modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValWriteAccessor(OutputPort logicalSignal) { + return super.getNoValWriteAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueWriteAccessor(OutputPort logicalSignal, IExpressionTerm value) { + return super.getValueWriteAccessor(logicalSignal, value); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..11be1a6459f51002525e0e0ea868d5e1d04d7fde --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button1Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button1; + +/** + * Executable for {@link Button1}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button1Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public Button1Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..d5aa1fa1ad8fc421a254d76135755f3f45b8fe1a --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button2Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button2; + +/** + * Executable for {@link Button2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button2Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public Button2Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..442714daeaf3ea1396620baad9f01a096f6be1ce --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button3Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button3; + +/** + * Executable for {@link Button3}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button3Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public Button3Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..b3ce7f9fde0b596a7351b14fdac904a57adb2d7a --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Button4Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button4; + +/** + * Executable for {@link Button4}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button4Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public Button4Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..fa2ada7c4af9365f914df51e5cf1dbd963899341 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL1Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1; + +/** + * Executable for {@link ButtonL1}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL1Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public ButtonL1Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..dfc31cd88f64f9b7ecd5a0b3d16925b34ec1e15a --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonL2Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; + +/** + * Executable for {@link ButtonL2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL2Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public ButtonL2Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..cb506734cc34bbda70e1166c189ff54df70132a5 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR1Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1; + +/** + * Executable for {@link ButtonR1}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR1Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public ButtonR1Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java new file mode 100644 index 0000000000000000000000000000000000000000..2d5e6ea40acd995d6d2e9f0139090dde3c22a3aa --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/ButtonR2Executable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; + +/** + * Executable for {@link ButtonL2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR2Executable extends GenericReceiverExecutable { + + /** Constructor. */ + public ButtonR2Executable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..d2b8670d0e5259956767c75dffccdd42199c175c --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickXExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position; + +/** + * Executable for {@link Left_StickX_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickXExecutable extends GenericReceiverExecutable { + + /** Constructor. */ + public Left_StickXExecutable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..b34b1dd4b6f71e4a976fe98b4c83b2c92469a654 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Left_StickYExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position; + +/** + * Executable for {@link Left_StickY_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickYExecutable extends GenericReceiverExecutable { + + /** Constructor. */ + public Left_StickYExecutable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..c0dce60956294c97b806a0de3aadf3b58c8d9a97 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickXExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position; + +/** + * Executable for {@link Right_StickX_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickXExecutable extends GenericReceiverExecutable { + + /** Constructor. */ + public Right_StickXExecutable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java new file mode 100644 index 0000000000000000000000000000000000000000..d2a0bdb2d0bb53a9001eb92689f2f3cbd37b22e3 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/gamepad/Right_StickYExecutable.java @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.executable.gamepad; + +import org.fortiss.af3.component.model.InputPort; +import org.fortiss.af3.expression.model.terms.IExpressionTerm; +import org.fortiss.af3.platform.generic.generator.executable.GenericReceiverExecutable; +import org.fortiss.af3.platform.model.generic.GenericReceiver; +import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position; + +/** + * Executable for {@link Right_StickY_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickYExecutable extends GenericReceiverExecutable { + + /** Constructor. */ + public Right_StickYExecutable(GenericReceiver modelElement) { + super(modelElement); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getInitialization() { + return super.getInitialization(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getNoValGuardAccessor(InputPort logicalSignal) { + return super.getNoValGuardAccessor(logicalSignal); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getTermination() { + return super.getTermination(); + } + + /** {@inheritDoc} */ + @Override + public IExpressionTerm getValueReadAccessor(InputPort logicalSignal) { + return super.getValueReadAccessor(logicalSignal); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..ab91a6147058b0d300100ac7070133f9bee3c02a --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPITransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform; + +import org.fortiss.af3.platform.raspberry.generator.executable.GPIExecutable; +import org.fortiss.af3.platform.raspberry.model.GPI; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link GPI}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class GPITransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return GPIExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return GPI.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof GPI; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new GPIExecutable((GPI)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..9a010deb5e9bc577bdc3a5a64dd943b3da53ac4d --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/GPOTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform; + +import org.fortiss.af3.platform.raspberry.generator.executable.GPOExecutable; +import org.fortiss.af3.platform.raspberry.model.GPO; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link GPO}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class GPOTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return GPOExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return GPO.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof GPO; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new GPOExecutable((GPO)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..e45b89e2a36d8539eb404a28f493fa3ef54b9142 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button1Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Button1} + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button1Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Button1Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Button1.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Button1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Button1Executable((Button1)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..8e3e58cf51dea515e251be05ebf4abba150fe24f --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button2Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button2; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Button2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button2Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Button2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Button2.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Button2; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Button2Executable((Button2)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..c599e6c4c60233bf246657f4cf703b71a624ecda --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button3Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button3; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Button3}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button3Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Button3Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Button3.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Button3; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Button3Executable((Button3)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..a5e9affb7fc50a61df77f5edfe587dab681f14ec --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Button4Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Button4; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Button4}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Button4Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Button4Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Button4.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Button4; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Button4Executable((Button4)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..55a3f76ae507cfda329c46bf143298c3b1eead8f --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL1Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonL1}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL1Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonL1Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonL1.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonL1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonL1Executable((ButtonL1)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..2b358b7319fe22bd676139053bf3be7ff3f98197 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonL2Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonL2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL2Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonL2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonL2.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonL2; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonL2Executable((ButtonL2)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..ccfbbef4c422202ecaf94c12945c626a00b14be9 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR1Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonR1}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR1Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR1Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonR1.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonR1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonR1Executable((ButtonR1)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..3e66560cbf087ba6a15db2e3bcc6488b8e750cdf --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/ButtonR2Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; +import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonR2}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR2Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonR2.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonR2; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonR2Executable((ButtonR2)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..90c1713f73468f07637ca8e742fb29d9a2468e93 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickXTransformation.java @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Left_StickX_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickXTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Left_StickX_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Left_StickX_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Left_StickXExecutable((Left_StickX_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..2d322eaf39590999928edae896d6560436d1990c --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Left_StickYTransformation.java @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Left_StickY_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickYTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Left_StickY_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Left_StickY_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Left_StickYExecutable((Left_StickY_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..984b3312688f312b98ac90ebfbe9af91cc1b0421 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickXTransformation.java @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Right_StickX_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickXTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Right_StickX_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Right_StickX_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Right_StickXExecutable((Right_StickX_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..ba6b02daab292ca479d166f3a59247e60a2ba678 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/gamepad/Right_StickYTransformation.java @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.gamepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable; +import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickYExecutable; +import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Right_StickY_Position}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickYTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR2Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Right_StickY_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Right_StickY_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Right_StickYExecutable((Right_StickY_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java index 7f241497a98acab87fd8a03a971830ff5a591799..02052cb2e99393d40234918b151f6ad00c2d38fb 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java @@ -156,7 +156,7 @@ public class RaspberryModelElementFactory { /** Creates a {@link Button1}. */ public static Button1 createButton1() { Button1 button = GamepadFactory.eINSTANCE.createButton1(); - button.setName("Button1 (Triangle)"); + button.setName("Button1_Triangle"); createConnectorLayout(button); return button; } @@ -164,7 +164,7 @@ public class RaspberryModelElementFactory { /** Creates a {@link Button2}. */ public static Button2 createButton2() { Button2 button = GamepadFactory.eINSTANCE.createButton2(); - button.setName("Button1 (Circle)"); + button.setName("Button1_Circle_"); createConnectorLayout(button); return button; } @@ -172,7 +172,7 @@ public class RaspberryModelElementFactory { /** Creates a {@link Button3}. */ public static Button3 createButton3() { Button3 button = GamepadFactory.eINSTANCE.createButton3(); - button.setName("Button3 (X)"); + button.setName("Button3_X"); createConnectorLayout(button); return button; } @@ -180,7 +180,7 @@ public class RaspberryModelElementFactory { /** Creates a {@link Button4}. */ public static Button4 createButton4() { Button4 button = GamepadFactory.eINSTANCE.createButton4(); - button.setName("Button4 (Square)"); + button.setName("Button4_Square"); createConnectorLayout(button); return button; }