Commit 514ec3cd authored by Yuanting Liu's avatar Yuanting Liu
Browse files

last commit from Chuanxin Liu before hand over to Anton

parent 4be464c2
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -25,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.gmf.xpand.xpandBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
......
#Sun Feb 06 16:09:57 CET 2011
eclipse.preferences.version=1
encoding//src/metamodel/multicore.ecore_diagram=UTF-8
encoding//src/metamodel/multicore.ecorediag=UTF-8
encoding//src/metamodel/multicore2.ecorediag=UTF-8
#Fri Mar 11 11:39:37 CET 2011
eclipse.preferences.version=1
metamodelContributor=org.eclipse.xtend.typesystem.emf.ui.EmfMetamodelContributor,org.eclipse.xtend.shared.ui.core.metamodel.jdt.javabean.JavaBeanMetamodelContributor
project.specific.metamodel=true
<?xml version="1.0" encoding="UTF-8"?>
<project name="From Metamodel to Code Generation" default="transform metamodels" basedir="./../..">
<project name="From Metamodel to Code Generation" default="4 transform metamodels" basedir="./../..">
<!-- Name of the project -->
<property name="project" value="org.fortiss.af3.multicore"/>
......@@ -30,22 +30,36 @@
<pathelement location="${org.fortiss.m2m.location}/bin"/>
<pathelement location="${org.fortiss.emf.location}/bin"/>
<pathelement location="${org.fortiss.core.location}/bin"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.application/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.deployment/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.filters/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.functionalarchitecture/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.generator/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.model/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.modes/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.msc/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.topology/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.common.architecture/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.commons/bin"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.editor.base/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.model.base/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.errormodel/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.errormodel/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.execution/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.generator/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.library.base/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.model.base/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.operatorpanel/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.operatorpanel/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.typesystem/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccsm.dev_tools/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccsm.emf_tools/build"/>
<pathelement location="${basedir}/../edu.tum.cs.ccts.common.architecture/build"/>
<pathelement location="${basedir}/../edu.tum.cs.rateclipse/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.generator/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.generator.embedded.c/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.model/build"/>
<pathelement location="${basedir}/../edu.tum.cs.af3.common.architecture/build"/>
<fileset dir="${eclipse.home}/plugins">
<include name="org.eclipse.xpand*.jar"/>
......@@ -59,35 +73,31 @@
<include name="org.eclipse.equinox.common*.jar"/>
<include name="org.antlr.runtime*.jar"/>
<include name="com.ibm.icu*.jar"/>
<include name="edu.tum.cs*.jar"/>
</fileset>
</path>
<!-- Removes generated files of production metamodel -->
<target name="clean production" >
<target name="1 clean production" >
<delete dir="${basedir}/src/production"/>
<delete dir="${basedir}/src/multicore"/>
<delete dir="${basedir}/src-gen/production"/>
<delete dir="${basedir}/src-gen/code"/>
<delete dir="${basedir}/src-gen/code-automaton"/>
<delete dir="${basedir}/src-gen/multicore"/>
<delete dir="${basedir}/src-gen/metamodel"/>
<delete dir="${basedir}/src-gen/model"/>
<delete dir="${basedir}/src-gen/model"/>
</target>
<!-- Remove the genmodel and the Modelcode for the Metamodel(ECore)(application, platform) -->
<target name="clean genmodel_and_modelcode" depends = "clean production">
<delete dir="${basedir}/src-gen/multicore"/>
<delete file="${basedir}/src-gen/metamodel/multicore.genmodel"/>
</target>
<!-- Generate the genmodel and Model Code for the Metamodel(ECore)(application, platform) -->
<target name="generate genmodel_and_modelcode" depends = "clean genmodel_and_modelcode">
<target name="3 generate genmodel_and_modelcode">
<emf.Ecore2Java
model="src/metamodel/multicore.ecore"
genModel="src-gen/metamodel/multicore.genmodel"
modelProject="/${project}"
modelProjectFragmentPath="src-gen"
modelProjectFragmentPath="src"
generateJavaCode="true"
jdklevel="${jdklevel}">
<arg line="-package www.fortiss.org/multicore"/>
......@@ -97,7 +107,7 @@
<!-- Transforms metamodels -->
<target name="transform metamodels" depends="generate genmodel_and_modelcode">
<target name="4 transform metamodels">
<!-- production.ecore is generated by the workflow: workflow_transform_metamodels.mwe, and production.genmodel is not generated from this workflow -->
<java
......@@ -129,7 +139,7 @@
model="src-gen/metamodel/production.ecore"
genModel="src-gen/metamodel/production.genmodel"
modelProject="/${project}"
modelProjectFragmentPath="src-gen"
modelProjectFragmentPath="src"
generateJavaCode="true"
jdklevel="${jdklevel}">
<arg line="-package www.fortiss.org/production"/>
......@@ -138,7 +148,7 @@
<!-- LEDBLinking starts here -->
<!-- Transforms models LEDBlinking -->
<target name="transform models LEDBlinking">
<target name="5_1 transform models LEDBlinking">
<java
classname="org.eclipse.emf.mwe.core.WorkflowRunner"
classpathref="deps.classpath"
......@@ -154,7 +164,7 @@
</target>
<!-- Generate code LEDBlinking-->
<target name="generate code LEDBlinking" depends="transform models LEDBlinking">
<target name="5_2 generate code LEDBlinking">
<java
classname="org.eclipse.emf.mwe.core.WorkflowRunner"
classpathref="deps.classpath"
......@@ -168,7 +178,7 @@
<!-- NoiseEliminator-->
<!-- Transforms models NoiseEliminator -->
<target name="transform models NoiseEliminator" >
<target name="6_1 transform models NoiseEliminator" >
<java
classname="org.eclipse.emf.mwe.core.WorkflowRunner"
classpathref="deps.classpath"
......@@ -184,7 +194,7 @@
</target>
<!-- Generate code NoiseEliminator-->
<target name="generate code NoiseEliminator" >
<target name="6_2 generate code NoiseEliminator" >
<java
classname="org.eclipse.emf.mwe.core.WorkflowRunner"
classpathref="deps.classpath"
......@@ -195,4 +205,15 @@
</java>
</target>
<!-- Generate code for automaton -->
<target name="7 generate code for automaton" >
<java
classname="org.eclipse.emf.mwe.core.WorkflowRunner"
classpathref="deps.classpath"
fork = "true"
dir="${basedir}">
<arg value="${basedir}/src/workflow/workflow_generate_code_automaton.mwe"/>
<arg value="--ant"/>
</java>
</target>
</project>
......@@ -9,9 +9,10 @@
//import production;
import edu::tum::cs::ccts::systemstructure::model;
import edu::tum::cs::af3::logicalarchitecture::model;
//import edu::tum::cs::ccts::systemstructure;
import edu::tum::cs::af3::logicalarchitecture;
String generateComponent2C(Component component): JAVA javacode.CodeGeneration.generateComponent2C_new(edu.tum.cs.ccts.systemstructure.model.ComponentBase);
//String generateComponent2C(Component component): JAVA javacode.CodeGeneration.generateComponent2C_new(edu.tum.cs.af3.logicalarchitecture.model.Component);
//String generateComponent2C(model::Component component): JAVA javacode.CodeGeneration.generateComponent2C_new(edu.tum.cs.ccts.systemstructure.model.ComponentBase);
String generateComponent2C(model::Component component): JAVA javacode.CodeGenerationNew.generateComponent2C(edu.tum.cs.af3.logicalarchitecture.model.Component);
//String generateComponent2C(model::Component component): JAVA javacode.CodeGenerationNew.generateComponent2C(edu.tum.cs.ccts.systemstructure.model.ComponentBase);
......@@ -48,7 +48,7 @@ public class CodeGeneration {
// // the funciton to generate the code for the automaton
// put the funciton to generate the code for automaton here
public static String generateComponent2C_new(ComponentBase component) {
public static String generateComponent2C_new(Component component) {
// Component component = transform(productionComponent);
// ComponentBase component = transform(productionComponent);
StateComponentSpecification behavior = (StateComponentSpecification) CommonArchitectureAccess
......
/**
* CodeGeneration functions.
*
* @author Chuanxin Liu (fortiss GmbH)
* @version 1.0
* @date 05.11.2010
*/
package javacode;
import edu.tum.cs.af3.generator.embedded.c.generator.ComponentGenerator;
import edu.tum.cs.af3.generator.embedded.c.model.CHeaderFile;
import edu.tum.cs.af3.generator.embedded.c.model.CImplementationFile;
import edu.tum.cs.af3.generator.imperative.execution.AutomatonImperativeComponent;
import edu.tum.cs.af3.generator.model.CompilationUnit;
import edu.tum.cs.af3.logicalarchitecture.model.Component;
import edu.tum.cs.af3.logicalarchitecture.model.StateComponentSpecification;
import edu.tum.cs.ccts.common.architecture.model.CommonArchitectureAccess;
import edu.tum.cs.ccts.systemstructure.model.ComponentBase;
import edu.tum.cs.commons.reflect.ReflectionUtils;
public class CodeGenerationNew {
public static String generateComponent2C(Component component) {
StateComponentSpecification behavior = (StateComponentSpecification) CommonArchitectureAccess
.getStateComponentSpecification(component);
AutomatonImperativeComponent automaton = new AutomatonImperativeComponent(
component, behavior, null);
automaton.initialize(true);
ComponentGenerator generator = new ComponentGenerator(automaton,
new CHeaderFile("dd.h"), null);
for (CompilationUnit unit : generator.getUnits()) {
if (unit instanceof CImplementationFile) {
return unit.toText();
}
}
throw new IllegalArgumentException(
"Cannot generate C code for component " + component.getName());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_0GSG4DB5EeCvmoHLQJnHKg" type="Ecore" measurementUnit="Pixel">
<styles xmi:type="notation:DiagramStyle" xmi:id="_0GSG4TB5EeCvmoHLQJnHKg"/>
<element xmi:type="ecore:EPackage" href="multicore.ecore#/"/>
</notation:Diagram>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="ASCII"?>
<logical-architecture-model:Component xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ccts="http://www4.in.tum.de/~ccts/typesystem" xmlns:ccts-editor-base="http://www4.in.tum.de/~ccts/editor/base" xmlns:logical-architecture-model="http://www4.in.tum.de/~af3/logicalarchitecture/model" xsi:schemaLocation="http://www4.in.tum.de/~ccts/typesystem ../../../edu.tum.cs.ccts.typesystem/model/typesystem.ecore http://www4.in.tum.de/~ccts/editor/base ../../../edu.tum.cs.ccts.editor.base/model/editor-base.ecore http://www4.in.tum.de/~af3/logicalarchitecture/model ../../../edu.tum.cs.af3.model/model/logical-architecture-model.ecore" name="LedBlinking2">
<components xsi:type="logical-architecture-model:Component" id="566" name="P2">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="408" y="144"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="109"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="567"/>
<ports xsi:type="logical-architecture-model:InputPort" id="576" name="recv_message" inChannels="574">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="584" name="send_message" outChannels="583">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="568" name="P1">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="192" y="264"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="97"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="569"/>
<ports xsi:type="logical-architecture-model:OutputPort" id="575" name="send_message_1" outChannels="574">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="578" name="send_message_2" outChannels="577">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="SOUTH"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:InputPort" id="588" name="recv_message" inChannels="586">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="36"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="570" name="P3">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="408" y="360"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="109"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="571"/>
<ports xsi:type="logical-architecture-model:InputPort" id="579" name="recv_message" inChannels="577">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="581" name="send_message" outChannels="580">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="572" name="P4">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="600" y="264"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="97"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="573"/>
<ports xsi:type="logical-architecture-model:InputPort" id="582" name="recv_message_2" inChannels="580">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="SOUTH"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:InputPort" id="585" name="recv_message_1" inChannels="583">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="587" name="send_message" outChannels="586">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="36"/>
</ports>
</components>
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="108" height="72"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="565"/>
<channels xsi:type="logical-architecture-model:Channel" id="574" name="mailbox1" sourcePort="575" destinationPort="576">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="577" name="mailbox2" sourcePort="578" destinationPort="579">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="580" name="mailbox4" sourcePort="581" destinationPort="582">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="583" name="mailbox3" sourcePort="584" destinationPort="585">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="586" name="mailbox5" sourcePort="587" destinationPort="588">
<layoutData xsi:type="ccts-editor-base:Points" key="points">
<points x="816" y="312"/>
<points x="816" y="408"/>
<points x="816" y="516"/>
<points x="120" y="516"/>
<points x="120" y="312"/>
</layoutData>
</channels>
</logical-architecture-model:Component>
\ No newline at end of file
<logical-architecture-model:Component xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ccts-editor-base="http://www4.in.tum.de/~ccts/editor/base" xmlns:ccts-typesystem-term="http://www4.in.tum.de/~ccts/typesystem/term" xmlns:logical-architecture-model="http://www4.in.tum.de/~af3/logicalarchitecture/model" xsi:schemaLocation="http://www4.in.tum.de/~ccts/editor/base ../../../edu.tum.cs.ccts.editor.base/model/editor-base.ecore http://www4.in.tum.de/~ccts/typesystem/term ../../../edu.tum.cs.ccts.typesystem/model/typesystem.ecore#//term http://www4.in.tum.de/~af3/logicalarchitecture/model ../../../edu.tum.cs.af3.model/model/logical-architecture-model.ecore" name="LedBlinking2">
<components xsi:type="logical-architecture-model:Component" id="566" name="P2">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="408" y="144"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="109"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="567"/>
<ports xsi:type="logical-architecture-model:InputPort" id="576" name="recv_message" inChannels="574">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="584" name="send_message" outChannels="583">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="568" name="P1">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="192" y="264"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="97"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="569"/>
<specifications xsi:type="logical-architecture-model:StateComponentSpecification" id="31">
<states xsi:type="logical-architecture-model:State" id="32" name="RootState">
<states xsi:type="logical-architecture-model:State" id="302" name="Delay1"/>
<connectionSegments xsi:type="logical-architecture-model:TransitionSegment">
<specifications xsi:type="logical-architecture-model:TransitionSegmentSpecification">
<preConditions xsi:type="logical-architecture-model:PreCondition">
<condition xsi:type="ccts-typesystem-term:BinaryOperation"/>
</preConditions>
</specifications>
</connectionSegments>
</states>
</specifications>
<ports xsi:type="logical-architecture-model:OutputPort" id="575" name="send_message_1" outChannels="574">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="578" name="send_message_2" outChannels="577">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="SOUTH"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:InputPort" id="588" name="recv_message" inChannels="586">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="36"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="570" name="P3">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="408" y="360"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="109"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="571"/>
<ports xsi:type="logical-architecture-model:InputPort" id="579" name="recv_message" inChannels="577">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="WEST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="581" name="send_message" outChannels="580">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="48"/>
</ports>
</components>
<components xsi:type="logical-architecture-model:Component" id="572" name="P4">
<layoutData xsi:type="ccts-editor-base:Point" key="pos" x="600" y="264"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="145" height="97"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="573"/>
<ports xsi:type="logical-architecture-model:InputPort" id="582" name="recv_message_2" inChannels="580">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="SOUTH"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:InputPort" id="585" name="recv_message_1" inChannels="583">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="60"/>
</ports>
<ports xsi:type="logical-architecture-model:OutputPort" id="587" name="send_message" outChannels="586">
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim"/>
<layoutData xsi:type="ccts-editor-base:Point" key="cpos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="cdim"/>
<layoutData xsi:type="ccts-editor-base:Orientation" key="corient" orientation="EAST"/>
<layoutData xsi:type="ccts-editor-base:Offset" key="coffset" offset="36"/>
</ports>
</components>
<layoutData xsi:type="ccts-editor-base:Point" key="pos"/>
<layoutData xsi:type="ccts-editor-base:Dimension" key="dim" width="108" height="72"/>
<specifications xsi:type="logical-architecture-model:CausalityComponentSpecification" id="565"/>
<channels xsi:type="logical-architecture-model:Channel" id="574" name="mailbox1" sourcePort="575" destinationPort="576">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="577" name="mailbox2" sourcePort="578" destinationPort="579">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="580" name="mailbox4" sourcePort="581" destinationPort="582">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="583" name="mailbox3" sourcePort="584" destinationPort="585">
<layoutData xsi:type="ccts-editor-base:Points" key="points"/>
</channels>
<channels xsi:type="logical-architecture-model:Channel" id="586" name="mailbox5" sourcePort="587" destinationPort="588">
<layoutData xsi:type="ccts-editor-base:Points" key="points">
<points x="816" y="312"/>
<points x="816" y="408"/>
<points x="816" y="516"/>
<points x="120" y="516"/>
<points x="120" y="312"/>
</layoutData>
</channels>
</logical-architecture-model:Component>
This diff is collapsed.
IMPORT edu::tum::cs::af3::logicalarchitecture::model
IMPORT edu::tum::cs::ccts::systemstructure::model
IMPORT edu::tum::cs::af3::logicalarchitecture
IMPORT edu::tum::cs::ccts::common::architecture::model
IMPORT edu::tum::cs::ccts::statetransition::model
IMPORT edu::tum::cs::ccts::base::model
IMPORT edu::tum::cs::ccts::editor::base::model
IMPORT production
IMPORT edu::tum::cs::commons::reflect
DEFINE GenAutomatonCodeComponentBase FOR edu::tum::cs::ccts::systemstructure::model::ComponentBase
IMPORT multicore
EXTENSION extend::codegeneration
DEFINE GenAutomatonCode FOR model::Component
FILE "CodeAutomaton.c"-
// this file is generated automatically
FOREACH this.components AS component
///////////////////////////////////////////////////////////////////////////////
///this is the generated code for automaton of component "component.name"////
///////////////////////////////////////////////////////////////////////////////
REM
IF component.name == "P2"