Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-02-27 16:03:29 +0000
committerHenrik Rentz-Reichert2012-02-27 16:03:29 +0000
commit9b63ec1b9654dd00d644ceb94f664df3e61d6c4e (patch)
tree3607453cd83d3e2963fd2a415a84289931d29e22
parent1b19f7079ee48921ad2fb0169eb73d537f9eab1e (diff)
parentfa4a03389b5596fbaa65d5acb0e198013c1820a8 (diff)
downloadorg.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.tar.gz
org.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.tar.xz
org.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.zip
Merge remote branch 'refs/remotes/origin/master'
Conflicts: plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericProtocolClassGenerator.java
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/.cproject15
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/.gitignore2
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch10
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch10
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/manualCGenLaunch.launch13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room46
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior211
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior135
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure40
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/generic_fsm_gen.AC.behavior106
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/generic_fsm_gen.room81
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c74
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h60
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c31
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h40
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c25
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h32
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c28
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h40
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c27
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h41
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c74
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h27
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h30
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h58
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c41
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/MSCLogTest.c4
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c2
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq110
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend11
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend8
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java34
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend230
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend4
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend17
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.xtend14
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java3
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java12
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java203
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java4
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java21
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java22
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaExtensions.xtend10
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaLanguageGenerator.java30
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend28
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java3
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java110
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java684
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/AbstractLanguageGenerator.java (renamed from plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageGenerator.java)26
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ILanguageExtension.java9
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageTransitionChainVisitor.java10
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/TypeHelpers.xtend4
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java4
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java6
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java4
-rw-r--r--plugins/org.eclipse.etrice.logging/bin/log4j.properties7
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.zipbin27511 -> 27617 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zipbin91999 -> 176946 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/.cproject17
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.abin144882 -> 302842 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etLogger.h)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.c)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.h)2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etUnit.c)16
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etUnit.h)1
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessage.c)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessage.h)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h)2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h)2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etActor.c)2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etActor.h)4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etPort.c)25
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etPort.h)8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/platform/etMemory.h29
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h27
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etDatatypes.h72
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etGlobalFlags.h22
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etLogger.c (renamed from runtime/org.eclipse.etrice.runtime.c/src/etLogger.c)2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c83
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/info.txt1
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h (renamed from runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h)1
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etGlobalFlags.h24
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etLogger.c70
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c26
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/info.txt2
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/.cproject309
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c7
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h19
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c3
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h9
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c2
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c4
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c134
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c98
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c90
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c198
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c4
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h42
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c134
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml2
106 files changed, 2082 insertions, 2368 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/.cproject b/examples/org.eclipse.etrice.generator.c.reference/.cproject
index f04d98017..f0ae9433f 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/.cproject
+++ b/examples/org.eclipse.etrice.generator.c.reference/.cproject
@@ -20,7 +20,9 @@
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1377401325" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.reference/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1914462916" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
- <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
+ <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
+ </option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1636502349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
@@ -32,7 +34,8 @@
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/common}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/platforms/generic}&quot;"/>
</option>
<option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
@@ -60,7 +63,13 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
- <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
+ <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Debug"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435">
diff --git a/examples/org.eclipse.etrice.generator.c.reference/.gitignore b/examples/org.eclipse.etrice.generator.c.reference/.gitignore
index 76b025ad1..bb84fd7b6 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/.gitignore
+++ b/examples/org.eclipse.etrice.generator.c.reference/.gitignore
@@ -1,2 +1,4 @@
Debug
Release
+src-gen/*
+!src-gen/readme.txt
diff --git a/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch b/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch
new file mode 100644
index 000000000..9931b7b5c
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
+<booleanAttribute key="GenInstanceDiagram" value="false"/>
+<stringAttribute key="GenModelPath" value=""/>
+<booleanAttribute key="Lib" value="false"/>
+<listAttribute key="ModelFiles">
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/generic_fsm_gen.room}"/>
+</listAttribute>
+<booleanAttribute key="SaveGenModel" value="false"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
new file mode 100644
index 000000000..f08002430
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
+<booleanAttribute key="GenInstanceDiagram" value="false"/>
+<stringAttribute key="GenModelPath" value=""/>
+<booleanAttribute key="Lib" value="false"/>
+<listAttribute key="ModelFiles">
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.room}"/>
+</listAttribute>
+<booleanAttribute key="SaveGenModel" value="false"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/manualCGenLaunch.launch b/examples/org.eclipse.etrice.generator.c.reference/manualCGenLaunch.launch
deleted file mode 100644
index 1e64a5132..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/manualCGenLaunch.launch
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.generator.c.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="${workspace_loc:org.eclipse.etrice.generator.c.reference}\model\cGenRef.room"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.c"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
index e04e7d4a0..2eea9b7d1 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
@@ -2,8 +2,8 @@ RoomModel cGenRef {
import room.basic.types.c.* from "CTypes.room"
SubSystemClass SubSys {
- ActorRef Receiver: ReceiverManual
- ActorRef Sender: SenderManual
+ ActorRef Sender: Sender
+ ActorRef Receiver: Receiver
Binding Sender.dataOut and Receiver.dataIn
}
@@ -39,7 +39,7 @@ RoomModel cGenRef {
Transition init: initial -> Idle { }
Transition tr0: Idle -> DataReceived {
triggers {
- <inMessage1: dataIn>
+ <sendData: dataIn>
}
action {
"dataIn.receivedData();"
@@ -65,12 +65,10 @@ RoomModel cGenRef {
Transition init: initial -> Idle { }
Transition tr0: Idle -> tp0 of Sending {
triggers {
- <inMessage1: dataIn>
+ <sendData: dataIn>
}
action {
- "//dataOut.get(0).sendData(data);"
- "//dataOut.get(1).sendData(data);"
- "dataOut.sendData(data);"
+ "dataOut.sendData();"
}
}
Transition tr1: tp1 of Sending -> ReceivedBoth {
@@ -84,37 +82,18 @@ RoomModel cGenRef {
Transition tr0: my tp0 -> WaitingForReceived
Transition tr1: WaitingForReceived -> ReceivedOne {
triggers {
- <outMessage1: dataOut guard {
- "true"
- }>
- }
- }
- Transition tr2: WaitingForReceived -> ReceivedTheOther {
- triggers {
- <outMessage1: dataOut guard {
- "false"
- }>
+ <receivedData: dataOut>
}
}
Transition tr3: ReceivedOne -> my tp1 {
triggers {
- <outMessage1: dataOut guard {
- "true"
- }>
- }
- }
- Transition tr4: ReceivedTheOther -> my tp1 {
- triggers {
- <outMessage1: dataOut guard {
- "false"
- }>
+ <receivedData: dataOut>
}
}
EntryPoint tp0
ExitPoint tp1
State WaitingForReceived
State ReceivedOne
- State ReceivedTheOther
}
}
State ReceivedBoth
@@ -160,12 +139,12 @@ RoomModel cGenRef {
Transition init: initial -> SendingData { }
Transition tr0: SendingData -> Done {
triggers {
- <outMessage1: dataOut>
+ <receivedData: dataOut>
}
}
State SendingData {
entry {
- "dataOut.sendData(1234);"
+ "dataOut.sendData();"
}
}
State Done
@@ -175,14 +154,11 @@ RoomModel cGenRef {
ProtocolClass CommunicationProtocol {
incoming {
- Message inMessage1(data: int32)
- Message inMessage2(data: DataClass1)
+ Message sendData()
}
outgoing {
- Message outMessage1()
- Message outMessage2()
- Message outMessage123456789()
+ Message receivedData()
}
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior
index e73b8c8a9..8b634e8cb 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.behavior" name="Behavior of Broadcast" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.3/@children.1/@link //@children.1/@children.2/@link //@children.0/@children.3/@children.2/@link //@children.1/@children.3/@link //@children.1/@children.4/@link //@children.1/@children.5/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@connections.6/@link //@connections.7/@link" verticalGridUnit="0">
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.behavior" name="Behavior of Broadcast" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.3/@children.1/@link //@children.1/@children.2/@link //@children.0/@children.3/@children.2/@link //@children.1/@children.3/@link //@children.1/@children.4/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link" verticalGridUnit="0">
<graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
<link>
<businessObjects href="../cGenRef.room#ActorClass:Broadcast"/>
</link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="sg"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#StateMachine:Broadcast$sg"/>
+ <businessObjects href="../cGenRef.room#StateGraph:Broadcast$sg"/>
</link>
- <children visible="true">
+ <children>
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="trp"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
<graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#StateMachine:Broadcast$sg"/>
+ <businessObjects href="../cGenRef.room#StateGraph:Broadcast$sg"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="state"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="170" y="80">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
@@ -55,27 +55,27 @@
<link>
<businessObjects href="../cGenRef.room#BaseState:Broadcast$Idle"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" incomingConnections="//@connections.5"/>
- <children visible="true">
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Idle"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="370" y="80">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="194" height="138" x="337" y="184">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="134" height="78" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="15" height="8" x="109" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="67" y="72">
<points x="-3" y="-3"/>
<points x="-3" y="3"/>
<points x="-11" y="3"/>
</graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="67" y="72">
<points x="3" y="-3"/>
<points x="3" y="3"/>
<points x="11" y="3"/>
</graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="67" y="72">
<points x="-2" y="-3"/>
<points x="-2" y="3"/>
<points x="2" y="3"/>
@@ -87,13 +87,13 @@
<businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sending"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="134" height="78" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sending"/>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="trp"/>
<properties key="item-kind" value="entp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="19">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="42">
<graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
<graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0">
<points x="27" y="33"/>
@@ -107,15 +107,15 @@
<link>
<businessObjects href="../cGenRef.room#EntryPoint:Broadcast$Sending$tp0"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.6" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.4" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="22" font="//@fonts.0" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="trp"/>
<properties key="item-kind" value="extp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="39">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="64" y="78">
<graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
<graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="25" y="25">
<points x="5"/>
@@ -127,15 +127,15 @@
<link>
<businessObjects href="../cGenRef.room#ExitPoint:Broadcast$Sending$tp1"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.7" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="22" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp1"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="22" font="//@fonts.0" verticalAlignment="ALIGNMENT_BOTTOM" value="tp1"/>
</children>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <children xsi:type="pi:ContainerShape" active="true">
<properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="149" height="90" x="556" y="80">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="149" height="90" x="405" y="316">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="64" y="3" cornerHeight="5" cornerWidth="5"/>
<graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
@@ -159,25 +159,25 @@
<link>
<businessObjects href="../cGenRef.room#BaseState:Broadcast$ReceivedBoth"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.7" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedBoth"/>
</children>
</children>
</children>
- <children xsi:type="pi:ContainerShape" active="true">
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="sg"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#PlainStateGraph:Broadcast$Sending$sg"/>
+ <businessObjects href="../cGenRef.room#StateGraph:Broadcast$Sending$sg"/>
</link>
- <children>
+ <children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/Sending"/>
</children>
- <children xsi:type="pi:ContainerShape" active="true">
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="trp"/>
<properties key="item-kind" value="entp"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="256">
@@ -195,11 +195,11 @@
<businessObjects href="../cGenRef.room#EntryPoint:Broadcast$Sending$tp0"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children>
+ <children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" active="true">
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="trp"/>
<properties key="item-kind" value="extp"/>
<graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="522">
@@ -214,14 +214,14 @@
<link>
<businessObjects href="../cGenRef.room#ExitPoint:Broadcast$Sending$tp1"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.3 //@connections.4" referencedGraphicsAlgorithm="//@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp1"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" active="true">
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="185" height="90" x="138" y="80">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="185" height="90" x="193" y="91">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
<graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="100" y="3" cornerHeight="5" cornerWidth="5"/>
<graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
@@ -245,27 +245,27 @@
<link>
<businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$WaitingForReceived"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.1/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.1/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="WaitingForReceived"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" active="true">
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="146" height="90" x="357" y="80">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="86" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="61" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="185" height="90" x="479" y="298">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="100" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
<points x="-3" y="-3"/>
<points x="-3" y="3"/>
<points x="-11" y="3"/>
</graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
<points x="3" y="-3"/>
<points x="3" y="3"/>
<points x="11" y="3"/>
</graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
<points x="-2" y="-3"/>
<points x="-2" y="3"/>
<points x="2" y="3"/>
@@ -276,116 +276,68 @@
<link>
<businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$ReceivedOne"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.1/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="86" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedOne"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="175" height="90" x="543" y="80">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="115" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="90" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$ReceivedTheOther"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.1/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="115" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedTheOther"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.1/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedOne"/>
</children>
</children>
</children>
- <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.1/@anchors.0" end="//@children.1/@children.3/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.1/@children.1/@anchors.0" end="//@children.1/@children.3/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
<businessObjects href="../cGenRef.room#ContinuationTransition:Broadcast$Sending$tr0"/>
</link>
- <connectionDecorators locationRelative="true" location="1.0">
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
<points x="-15" y="5"/>
<points/>
<points x="-15" y="-5"/>
</graphicsAlgorithm>
</connectionDecorators>
- <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: "/>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.4/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.4/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
<businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr1"/>
</link>
- <connectionDecorators locationRelative="true" location="1.0">
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
<points x="-15" y="5"/>
<points/>
<points x="-15" y="-5"/>
</graphicsAlgorithm>
</connectionDecorators>
- <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr1: &lt;receivedData:d..."/>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.5/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr2"/>
- </link>
- <connectionDecorators locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr2: &lt;receivedData:d..."/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.4/@anchors.0" end="//@children.1/@children.2/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.1/@children.4/@anchors.0" end="//@children.1/@children.2/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
<businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr3"/>
</link>
- <connectionDecorators locationRelative="true" location="1.0">
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
<points x="-15" y="5"/>
<points/>
<points x="-15" y="-5"/>
</graphicsAlgorithm>
</connectionDecorators>
- <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr3: &lt;receivedData:d..."/>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.5/@anchors.0" end="//@children.1/@children.2/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
- <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr4"/>
+ <businessObjects href="../cGenRef.room#InitialTransition:Broadcast$initial"/>
</link>
<connectionDecorators locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
@@ -395,57 +347,40 @@
</graphicsAlgorithm>
</connectionDecorators>
<connectionDecorators active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr4: &lt;receivedData:d..."/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#InitialTransition:Broadcast$initial"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@children.1/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@children.1/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
<businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$tr0"/>
</link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <connectionDecorators locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
<points x="-15" y="5"/>
<points/>
<points x="-15" y="-5"/>
</graphicsAlgorithm>
</connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;sendData:dataI..."/>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="-49" y="-15" font="//@fonts.0" value="tr0: &lt;sendData:dataI..."/>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@children.2/@anchors.0" end="//@children.0/@children.4/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.0/@children.3/@children.2/@anchors.0" end="//@children.0/@children.4/@anchors.0">
<properties key="obj-type" value="trans"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
<businessObjects href="../cGenRef.room#ContinuationTransition:Broadcast$tr1"/>
</link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <connectionDecorators locationRelative="true" location="1.0">
<graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
<points x="-15" y="5"/>
<points/>
<points x="-15" y="-5"/>
</graphicsAlgorithm>
</connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr1: "/>
</connectionDecorators>
</connections>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior
new file mode 100644
index 000000000..0d33249db
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.behavior" name="Behavior of Receiver" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../cGenRef.room#ActorClass:Receiver"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#StateGraph:Receiver$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="trp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#StateGraph:Receiver$sg"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="236" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Receiver$Idle"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Idle"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="149" height="90" x="488" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="64" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Receiver$DataReceived"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="DataReceived"/>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#InitialTransition:Receiver$initial"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Receiver$tr0"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;inMessage1:dat..."/>
+ </connectionDecorators>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
index 0693993c4..bd3c5bc5b 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.structure" name="Structure of SubSys" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@children.0/@children.0/@children.1/@link //@connections.0/@link" verticalGridUnit="0">
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.structure" name="Structure of SubSys" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.0/@children.1/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="0">
<graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
<link>
<businessObjects href="../cGenRef.room#SubSystemClass:SubSys"/>
@@ -15,66 +15,66 @@
</link>
<children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="223" y="272">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="327" y="98">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
</graphicsAlgorithmChildren>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#ActorRef:SubSys$Receiver"/>
+ <businessObjects href="../cGenRef.room#ActorRef:SubSys$Sender"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Receiver&#xA;(ReceiverManual)"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sender&#xA;(Sender)"/>
</children>
<children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="63">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="92" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#Port:ReceiverManual$dataIn"/>
+ <businessObjects href="../cGenRef.room#Port:Sender$dataOut"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="39" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
</children>
</children>
</children>
<children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="223" y="85">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="148" y="358">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
</graphicsAlgorithmChildren>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#ActorRef:SubSys$Sender"/>
+ <businessObjects href="../cGenRef.room#ActorRef:SubSys$Receiver"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sender&#xA;(SenderManual)"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Receiver&#xA;(Receiver)"/>
</children>
<children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="port"/>
- <properties key="item-kind" value="C"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="77" y="80">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#Port:SenderManual$dataOut"/>
+ <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="39" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
</children>
</children>
</children>
</children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@children.1/@anchors.0" end="//@children.0/@children.0/@children.1/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.0/@children.1/@anchors.0" end="//@children.0/@children.1/@children.1/@anchors.0">
<properties key="obj-type" value="bind"/>
<graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
<link>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/generic_fsm_gen.AC.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/generic_fsm_gen.AC.behavior
new file mode 100644
index 000000000..989f6f7cb
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/generic_fsm_gen.AC.behavior
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.behavior" name="Behavior of AC" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#ActorClass:AC"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#StateGraph:AC$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="trp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#StateGraph:AC$sg"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="370" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#BaseState:AC$state0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0 //@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state0"/>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#InitialTransition:AC$initial"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../generic_fsm_gen.room#TriggeredTransition:AC$tr0"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;m1:fct>"/>
+ </connectionDecorators>
+ <bendpoints x="470" y="285"/>
+ <bendpoints x="470" y="285"/>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/generic_fsm_gen.room b/examples/org.eclipse.etrice.generator.c.reference/model/generic_fsm_gen.room
new file mode 100644
index 000000000..8f825d377
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/generic_fsm_gen.room
@@ -0,0 +1,81 @@
+RoomModel generic_fsm_gen {
+
+ SubSystemClass Main {
+ ActorRef sys: AC
+ ActorRef peer: Peer
+ Binding sys.fct and peer.fct
+ }
+
+ ActorClass Peer {
+ Interface {
+ conjugated Port fct: PC
+ }
+ Structure {
+ external Port fct
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> state0 {
+ action {
+ "PCConjPort_m1(&self->constData->fct);"
+ }
+ }
+ Transition tr0: state0 -> state0 {
+ triggers {
+ <m2: fct>
+ }
+ action {
+ "printf(\"Peer\\n\");"
+ "PCConjPort_m1(&self->constData->fct);"
+ }
+ }
+ State state0
+ }
+ }
+ }
+
+ ActorClass AC {
+ Interface {
+ Port fct: PC
+ }
+ Structure {
+ external Port fct
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> state0 { }
+ Transition tr0: state0 -> state0 {
+ triggers {
+ <m1: fct>
+ }
+ action {
+ "printf(\"AC\\n\");"
+ "static int32 counter = 0;"
+ "if (++counter < 3){"
+ "\tPCPort_m2(&self->constData->fct);"
+ "}"
+ }
+ }
+ State state0
+ }
+ }
+ }
+
+ ProtocolClass PC {
+ incoming {
+ Message m1()
+ }
+ outgoing {
+ Message m2()
+ }
+ }
+
+ DataClass DC {
+ Attribute ival: int32
+ Operation mult(a: int32, b: int32): int32 {
+ "return a*b;"
+ }
+ }
+
+ PrimitiveType int32 -> int (Integer) default "0"
+} \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c
deleted file mode 100644
index 8dc2b76bf..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ProtocolClass CommunicationProtocol
- *
- */
-
-#include "CommunicationProtocol.h"
-
-#include "etMSCLogger.h"
-
-/*--------------------- port classes */
-
-void CommunicationProtocolPort_outMessage1(const CommunicationProtocolPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "outMessage1")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_OUT_outMessage1;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-void CommunicationProtocolPort_outMessage2(const CommunicationProtocolPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "outMessage2")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_OUT_outMessage2;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-void CommunicationProtocolPort_outMessage123456789(const CommunicationProtocolPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "outMessage123456789")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_OUT_outMessage123456789;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-
-void CommunicationProtocolConjPort_inMessage1(const CommunicationProtocolConjPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "inMessage1")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_IN_inMessage1;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-void CommunicationProtocolConjPort_inMessage2(const CommunicationProtocolConjPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "inMessage2")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_IN_inMessage2;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-
-/*--------------------- debug helpers */
-
-/* TODO: make this optional or different for smaller footprint */
-/* message names as strings for debugging (generate MSC) */
-static const char* CommunicationProtocol_messageStrings[] = {"MIN", "outMessage1","outMessage2","outMessage123456789","inMessage1", "inMessage2", "MAX"};
-
-const char* CommunicationProtocol_getMessageString(int msg_id) {
- if (msg_id<CommunicationProtocol_MSG_MIN || msg_id>CommunicationProtocol_MSG_MAX+1){
- /* id out of range */
- return "Message ID out of range";
- }
- else{
- return CommunicationProtocol_messageStrings[msg_id];
- }
-}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h
deleted file mode 100644
index 607dbb894..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ProtocolClass CommunicationProtocol
- *
- */
-
-#ifndef _COMMUNICATIONPROTOCOL_H_
-#define _COMMUNICATIONPROTOCOL_H_
-
-#include "etDatatypes.h"
-#include "etPort.h"
-
-
-#include "DataClass1.h"
-
-/* message IDs */
-enum {
- CommunicationProtocol_MSG_MIN = 0,
- /* IDs for outgoing messages */
- CommunicationProtocol_OUT_outMessage1 = 1,
- CommunicationProtocol_OUT_outMessage2 = 2,
- CommunicationProtocol_OUT_outMessage123456789 = 3,
- /* IDs for incoming messages */
- CommunicationProtocol_IN_inMessage1 = 4,
- CommunicationProtocol_IN_inMessage2 = 5,
- /* error if msgID >= MSG_MAX */
- CommunicationProtocol_MSG_MAX = 6
-};
-
-/*--------------------- port classes */
-
-typedef etPort CommunicationProtocolPort;
-
-void CommunicationProtocolPort_outMessage1(const CommunicationProtocolPort* self);
-void CommunicationProtocolPort_outMessage2(const CommunicationProtocolPort* self);
-void CommunicationProtocolPort_outMessage123456789(const CommunicationProtocolPort* self);
-
-
-
-
-
-typedef etPort CommunicationProtocolConjPort;
-
-void CommunicationProtocolConjPort_inMessage1(const CommunicationProtocolConjPort* self);
-void CommunicationProtocolConjPort_inMessage2(const CommunicationProtocolConjPort* self);
-
-
-
-
-
-/*--------------------- debug helpers */
-
-/* get message string for message id */
-const char* CommunicationProtocol_getMessageString(int msg_id);
-
-
-
-#endif /* _COMMUNICATIONPROTOCOL_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c
deleted file mode 100644
index d66aaaae4..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of DataClass DataClass1
- *
- */
-
-#include "DataClass1.h"
-
-#include <string.h>
-
-//--------------------- begin user code
- // usercode3
-//--------------------- end user code
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value) {
- return self->Attr1*value;
-}
-float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value) {
- return self->Attr3*value;
-}
-
-// deep copy
-void DataClass1_deepCopy(DataClass1* source, DataClass1* target) {
- memcpy(target, source, sizeof(DataClass1));
-}
-
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h
deleted file mode 100644
index c9ffdba2b..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of DataClass DataClass1
- *
- */
-
-#ifndef _DATACLASS1_H_
-#define _DATACLASS1_H_
-
-#include "etDatatypes.h"
-
-/* TODO: includes only for used DataClasses, also for other models */
-#include "DataClass2.h"
-
-//--------------------- begin user code
- // usercode1
-//--------------------- end user code
-
-typedef struct {
- //--------------------- begin user code
- // usercode2
- //--------------------- end user code
- //--------------------- attributes
- int32 Attr1;
- DataClass2 ComplexAttr;
- float32 Attr3;
-} DataClass1;
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value);
-float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
-
-// deep copy
-void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
-
-#endif /* _DATACLASS1_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c
deleted file mode 100644
index 6445aa75a..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of DataClass DataClass2
- *
- */
-
-#include "DataClass2.h"
-
-#include <string.h>
-
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-void DataClass2_Operation1(DataClass2* self) {
- /*nothing to do*/
-}
-
-// deep copy
-void DataClass2_deepCopy(DataClass2* source, DataClass2* target) {
- memcpy(target, source, sizeof(DataClass2));
-}
-
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h
deleted file mode 100644
index dc3dd8c7c..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of DataClass DataClass2
- *
- */
-
-#ifndef _DATACLASS2_H_
-#define _DATACLASS2_H_
-
-#include "etDatatypes.h"
-
-/* TODO: includes only for used DataClasses, also for other models */
-
-
-typedef struct {
- //--------------------- attributes
- int32 Attr1;
- float32 Attr2;
- int32 Attr3;
-} DataClass2;
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-void DataClass2_Operation1(DataClass2* self);
-
-// deep copy
-void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
-
-#endif /* _DATACLASS2_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c
deleted file mode 100644
index 398f681a9..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass ReceiverManual
- *
- */
-
-#include "ReceiverManual.h"
-
-#include "etLogger.h"
-
-#include "etMSCLogger.h"
-
-
-void ReceiverManual_init(ReceiverManual* self){
- ET_MSC_LOGGER_SYNC_ENTRY("ReceiverManual", "init")
- CommunicationProtocolPort_outMessage1(&self->constData->dataIn);
- CommunicationProtocolPort_outMessage2(&self->constData->dataIn);
- CommunicationProtocolPort_outMessage123456789(&self->constData->dataIn);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("ReceiverManual", "ReceiveMessage")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h
deleted file mode 100644
index aea6fc331..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ActorClass ReceiverManual
- *
- */
-
-#ifndef _RECEIVERMANUAL_H_
-#define _RECEIVERMANUAL_H_
-
-#include "etDatatypes.h"
-
-
-#include "CommunicationProtocol.h"
-
-
-typedef struct ReceiverManual ReceiverManual;
-
-/* const part of ActorClass (ROM) */
-typedef struct ReceiverManual_const {
- const ReceiverManual* actor;
- /* Ports */
- const CommunicationProtocolPort dataIn;
-
-} ReceiverManual_const;
-
-/* variable part of ActorClass (RAM) */
-struct ReceiverManual {
- const ReceiverManual_const* constData;
-};
-
-void ReceiverManual_init(ReceiverManual* self);
-
-void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg);
-
-
-
-
-#endif /* _RECEIVERMANUAL_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c
deleted file mode 100644
index 5c3b7cae0..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass SenderManual
- *
- */
-
-#include "SenderManual.h"
-
-#include "etLogger.h"
-
-#include "etMSCLogger.h"
-
-
-void SenderManual_init(SenderManual* self){
- ET_MSC_LOGGER_SYNC_ENTRY("SenderManual", "init")
- CommunicationProtocolConjPort_inMessage1(&self->constData->dataOut);
- CommunicationProtocolConjPort_inMessage2(&self->constData->dataOut);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("SenderManual", "ReceiveMessage")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h
deleted file mode 100644
index b3980e4bb..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ActorClass SenderManual
- *
- */
-
-#ifndef _SENDERMANUAL_H_
-#define _SENDERMANUAL_H_
-
-#include "etDatatypes.h"
-
-#include "DataClass1.h"
-
-#include "CommunicationProtocol.h"
-
-
-typedef struct SenderManual SenderManual;
-
-/* const part of ActorClass (ROM) */
-typedef struct SenderManual_const {
- const SenderManual* actor;
- /* Ports */
- const CommunicationProtocolConjPort dataOut;
-
-} SenderManual_const;
-
-/* variable part of ActorClass (RAM) */
-struct SenderManual {
- const SenderManual_const* constData;
-};
-
-void SenderManual_init(SenderManual* self);
-
-void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg);
-
-
-
-
-#endif /* _SENDERMANUAL_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c
deleted file mode 100644
index 91daf5c31..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of SubSystemClass SubSys
- *
- */
-
-#include "SubSys.h"
-
-/* include instances for all classes */
-#include "SubSys_Inst.h"
-#include "SubSys_Disp.h"
-
-#include "etLogger.h"
-#include "etMSCLogger.h"
-
-
-/* data for SubSysten SubSys */
-typedef struct SubSys {
- char *name;
-} SubSys;
-
-static SubSys SubSysInst = {"SubSys"};
-
-void SubSys_initActorInstances(void);
-
-void SubSys_init(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "init")
- etLogger_logInfoF("%s_init", SubSysInst.name);
-
- /* initialization of all message services */
- etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_Thread1_receiveMessage);
-
- /* init all actors */
- SubSys_initActorInstances();
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_start(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "start")
- etLogger_logInfoF("%s_start", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_run(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "run")
- int32 i;
- for (i=0; i<100; i++){
- etLogger_logInfoF("%s Scheduler tick %d", SubSysInst.name, i);
- etMessageService_execute(&msgService_Thread1);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_stop(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "stop")
- etLogger_logInfoF("%s_stop", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_destroy(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "destroy")
- etLogger_logInfoF("%s_destroy", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_initActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "initActorInstances")
- ReceiverManual_init(&_SubSys_Receiver);
- SenderManual_init(&_SubSys_Sender);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h
deleted file mode 100644
index eee116929..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of SubSystemClass SubSys
- *
- */
-
-#ifndef _SUBSYS_H_
-#define _SUBSYS_H_
-
-
-/* lifecycle functions
- * init -> start -> run (loop) -> stop -> destroy
- */
-
-void SubSys_init(void); /* lifecycle init */
-void SubSys_start(void); /* lifecycle start */
-
-void SubSys_run(void); /* lifecycle run */
-
-void SubSys_stop(void); /* lifecycle stop */
-void SubSys_destroy(void); /* lifecycle destroy */
-
-
-#endif /* _SUBSYS_H_ */
-
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h
deleted file mode 100644
index c6a09aa28..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Dispatcher File of SubSystemClass SubSys
- * - one generated dispatcher for each MessageService (Thread)
- */
-
-#include "etMessageReceiver.h"
-#include "etLogger.h"
-#include "etMSCLogger.h"
-
-static void MsgDispatcher_Thread1_receiveMessage(const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_Thread1", "receiveMessage")
- switch(msg->address){
-
- /* interface items of /SubSys/Receiver */
- case 102:
- etPort_receive(&_SubSys_Receiver_const.dataIn, msg);
- break;
- /* interface items of /SubSys/Sender */
- case 104:
- etPort_receive(&_SubSys_Sender_const.dataOut, msg);
- break;
-
- default:
- etLogger_logErrorF("MessageService_Thread1_ReceiveMessage: address %d does not exist ", msg->address);
- break;
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h
deleted file mode 100644
index 9cc7e3586..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Instance File of SubSystemClass SubSys
- * - instantiation of all actor instances and port instances
- * - configuration of data and connection of ports
- */
-
-#include "etMessageService.h"
-
-/* instantiation of message services */
-#define MESSAGE_POOL_MAX 10
-#define MESSAGE_BLOCK_SIZE 32
-/* MessageService for Thread1 */
-uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
-etMessageService msgService_Thread1;
-
-
-/* include all used ActorClasses */
-/* TODO: only include used Actor Classes for current SubSystem */
-#include "SenderManual.h"
-#include "ReceiverManual.h"
-
-/* include all used ProtcolClasses */
-#include "CommunicationProtocol.h"
-
-
-/* declarations of all ActorClass instances (const and variable structs) */
-
-/* forward declaration of variable actor structs */
-static ReceiverManual _SubSys_Receiver;
-static SenderManual _SubSys_Sender;
-
-
-/* instance _SubSys_Receiver */
-static const ReceiverManual_const _SubSys_Receiver_const = {
- &_SubSys_Receiver,
- /* Ports: {myActor, etReceiveMessage, msgService, peerAddress, localId} */
- /* TODO: not robust if not connected and not implemented for replication */
- {&_SubSys_Receiver, ReceiverManual_ReceiveMessage, &msgService_Thread1, 104, 123} /* Port dataIn */
-
-};
-static ReceiverManual _SubSys_Receiver = {&_SubSys_Receiver_const};
-
-/* instance _SubSys_Sender */
-static const SenderManual_const _SubSys_Sender_const = {
- &_SubSys_Sender,
- /* Ports: {myActor, etReceiveMessage, msgService, peerAddress, localId} */
- /* TODO: not robust if not connected and not implemented for replication */
- {&_SubSys_Sender, SenderManual_ReceiveMessage, &msgService_Thread1, 102, 123} /* Port dataOut */
-
-};
-static SenderManual _SubSys_Sender = {&_SubSys_Sender_const};
-
-
-
-
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c
deleted file mode 100644
index b0b586b8b..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * this class contains the main function running component SubSys
- * it instantiates SubSys and starts and ends the lifecycle
- */
-
-
-#include "SubSys.h"
-
-#include "etLogger.h"
-#include "etMSCLogger.h"
-
-
-/**
- * main function
- * creates component and starts and stops the lifecycle
- */
-
-int main(void) {
-
- etLogger_logInfo("*** T H E B E G I N ***");
- ET_MSC_LOGGER_OPEN("main");
-
- /* startup sequence of lifecycle */
- SubSys_init(); /* lifecycle init */
- SubSys_start(); /* lifecycle start */
-
- /* run Scheduler */
- SubSys_run();
-
- /* shutdown sequence of lifecycle */
- SubSys_stop(); /* lifecycle stop */
- SubSys_destroy(); /* lifecycle destroy */
-
- ET_MSC_LOGGER_CLOSE
- etLogger_logInfo("*** T H E E N D ***");
-
- return 0;
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/MSCLogTest.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/MSCLogTest.c
index 382d367fc..9321b8c55 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/MSCLogTest.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/MSCLogTest.c
@@ -1,6 +1,6 @@
-#include "etLogger.h"
-#include "etMSCLogger.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
void Class2_ff(void) {
ET_MSC_LOGGER_SYNC_ENTRY("Class2", "ff")
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c
index b9c769bf0..5a529aa03 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-#include "etLogger.h"
+#include "debugging/etLogger.h"
typedef struct SubSystem {
char *name;
diff --git a/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq b/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
index 6fb62a902..3a680a063 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
+++ b/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
@@ -28,50 +28,8 @@ etMessageService <== etMessageQueue
etMessageService <== etMessageService
SubSys <== etMessageService
SubSys ==> SubSys initActorInstances
-SubSys ==> ReceiverManual init
-ReceiverManual ==> CommunicationProtocolPort outMessage1
-CommunicationProtocolPort ==> etMessageService getMessageBuffer
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-CommunicationProtocolPort ==> etMessageService pushMessage
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-ReceiverManual <== CommunicationProtocolPort
-ReceiverManual ==> CommunicationProtocolPort outMessage2
-CommunicationProtocolPort ==> etMessageService getMessageBuffer
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-CommunicationProtocolPort ==> etMessageService pushMessage
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-ReceiverManual <== CommunicationProtocolPort
-ReceiverManual ==> CommunicationProtocolPort outMessage123456789
-CommunicationProtocolPort ==> etMessageService getMessageBuffer
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-CommunicationProtocolPort ==> etMessageService pushMessage
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-ReceiverManual <== CommunicationProtocolPort
-SubSys <== ReceiverManual
-SubSys ==> SenderManual init
-SenderManual ==> CommunicationProtocolConjPort inMessage1
-CommunicationProtocolConjPort ==> etMessageService getMessageBuffer
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-CommunicationProtocolConjPort <== etMessageService
-CommunicationProtocolConjPort ==> etMessageService pushMessage
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-CommunicationProtocolConjPort <== etMessageService
-SenderManual <== CommunicationProtocolConjPort
-SenderManual ==> CommunicationProtocolConjPort inMessage2
+SubSys ==> Sender init
+Sender ==> CommunicationProtocolConjPort sendData
CommunicationProtocolConjPort ==> etMessageService getMessageBuffer
etMessageService ==> etMessageQueue pop
etMessageService <== etMessageQueue
@@ -80,8 +38,10 @@ CommunicationProtocolConjPort ==> etMessageService pushMessage
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
CommunicationProtocolConjPort <== etMessageService
-SenderManual <== CommunicationProtocolConjPort
-SubSys <== SenderManual
+Sender <== CommunicationProtocolConjPort
+SubSys <== Sender
+SubSys ==> Receiver init
+SubSys <== Receiver
SubSys <== SubSys
main <== SubSys
main ==> SubSys start
@@ -97,56 +57,18 @@ etMessageService <== etMessageQueue
etMessageService <== etMessageService
etMessageService ==> MsgDispatcher_Thread1 receiveMessage
MsgDispatcher_Thread1 ==> etPort receive
-etPort ==> SenderManual ReceiveMessage
-etPort <== SenderManual
-MsgDispatcher_Thread1 <== etPort
-etMessageService <== MsgDispatcher_Thread1
-etMessageService ==> etMessageService returnMessageBuffer
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> etMessageQueue isNotEmpty
-etMessageService <== etMessageQueue
-etMessageService ==> etMessageService popMessage
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> MsgDispatcher_Thread1 receiveMessage
-MsgDispatcher_Thread1 ==> etPort receive
-etPort ==> SenderManual ReceiveMessage
-etPort <== SenderManual
-MsgDispatcher_Thread1 <== etPort
-etMessageService <== MsgDispatcher_Thread1
-etMessageService ==> etMessageService returnMessageBuffer
-etMessageService ==> etMessageQueue push
-etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> etMessageQueue isNotEmpty
-etMessageService <== etMessageQueue
-etMessageService ==> etMessageService popMessage
+etPort ==> Receiver ReceiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etMessageService getMessageBuffer
etMessageService ==> etMessageQueue pop
etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> MsgDispatcher_Thread1 receiveMessage
-MsgDispatcher_Thread1 ==> etPort receive
-etPort ==> SenderManual ReceiveMessage
-etPort <== SenderManual
-MsgDispatcher_Thread1 <== etPort
-etMessageService <== MsgDispatcher_Thread1
-etMessageService ==> etMessageService returnMessageBuffer
+CommunicationProtocolPort <== etMessageService
+CommunicationProtocolPort ==> etMessageService pushMessage
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> etMessageQueue isNotEmpty
-etMessageService <== etMessageQueue
-etMessageService ==> etMessageService popMessage
-etMessageService ==> etMessageQueue pop
-etMessageService <== etMessageQueue
-etMessageService <== etMessageService
-etMessageService ==> MsgDispatcher_Thread1 receiveMessage
-MsgDispatcher_Thread1 ==> etPort receive
-etPort ==> ReceiverManual ReceiveMessage
-etPort <== ReceiverManual
+CommunicationProtocolPort <== etMessageService
+Receiver <== CommunicationProtocolPort
+etPort <== Receiver
MsgDispatcher_Thread1 <== etPort
etMessageService <== MsgDispatcher_Thread1
etMessageService ==> etMessageService returnMessageBuffer
@@ -161,8 +83,8 @@ etMessageService <== etMessageQueue
etMessageService <== etMessageService
etMessageService ==> MsgDispatcher_Thread1 receiveMessage
MsgDispatcher_Thread1 ==> etPort receive
-etPort ==> ReceiverManual ReceiveMessage
-etPort <== ReceiverManual
+etPort ==> Sender ReceiveMessage
+etPort <== Sender
MsgDispatcher_Thread1 <== etPort
etMessageService <== MsgDispatcher_Thread1
etMessageService ==> etMessageService returnMessageBuffer
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
index f9c689c15..ccc9013ac 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
@@ -80,7 +80,7 @@ class ActorClassGen extends GenericActorClassGenerator {
«generateIncludeGuardBegin(xpac.name)»
#include "etDatatypes.h"
- #include "etMessage.h"
+ #include "messaging/etMessage.h"
«FOR dataClass : root.getReferencedDataClasses(ac)»
#include "«dataClass.name».h"
@@ -148,9 +148,10 @@ class ActorClassGen extends GenericActorClassGenerator {
#include "«xpac.getCHeaderFileName»"
- #include "etActor.h"
- #include "etLogger.h"
- #include "etMSCLogger.h"
+ #include "modelbase/etActor.h"
+ #include "debugging/etLogger.h"
+ #include "debugging/etMSCLogger.h"
+ #include "platform/etMemory.h"
«FOR pc : root.getReferencedProtocolClasses(ac)»
#include "«pc.getCHeaderFileName»"
@@ -178,7 +179,7 @@ class ActorClassGen extends GenericActorClassGenerator {
ET_MSC_LOGGER_SYNC_ENTRY("«xpac.name»", "ReceiveMessage")
«IF xpac.hasNonEmptyStateMachine»
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(&msg[1]));
+ receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
«ENDIF»
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
index bea5bdd0a..598ae9024 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
@@ -25,7 +25,7 @@ import org.eclipse.etrice.core.room.RoomClass
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass
import org.eclipse.etrice.generator.etricegen.TransitionChain
import org.eclipse.etrice.generator.generic.ILanguageExtension
-import org.eclipse.etrice.generator.generic.LanguageGenerator
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator
import java.util.List
import org.eclipse.xtext.util.Pair
@@ -34,7 +34,7 @@ import org.eclipse.xtext.util.Pair
@Singleton
class CExtensions implements ILanguageExtension {
- @Inject LanguageGenerator languageGen
+ @Inject AbstractLanguageGenerator languageGen
override String getTypedDataDefinition(Message m) {
@@ -133,4 +133,8 @@ class CExtensions implements ILanguageExtension {
def String getExecuteChainCode(ExpandedActorClass ac, TransitionChain tc) {
return languageGen.getExecuteChain(ac, tc)
}
+
+ override String arrayDeclaration(String type, int size, String name) {
+ type+" "+name+"["+size+"]";
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java
new file mode 100644
index 000000000..c25db77be
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java
@@ -0,0 +1,34 @@
+package org.eclipse.etrice.generator.c.gen;
+
+import org.eclipse.etrice.core.room.PrimitiveType;
+import org.eclipse.etrice.core.room.VarDecl;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
+
+public class CLanguageGenerator extends AbstractLanguageGenerator {
+
+ public String[] getArglistAndTypedData(VarDecl data) {
+ if (data==null)
+ return new String[] {"", "", ""};
+
+ String typeName = data.getRefType().getType().getName();
+ String castTypeName = typeName+"*";
+ boolean byVal = false;
+ if (data.getRefType().getType() instanceof PrimitiveType) {
+ typeName = ((PrimitiveType)data.getRefType().getType()).getTargetName();
+ String ct = ((PrimitiveType)data.getRefType().getType()).getCastName();
+ byVal = true;
+ if (ct!=null && !ct.isEmpty())
+ castTypeName = ct;
+ }
+ else {
+ typeName = typeName+"*";
+ }
+
+ String typedData = typeName+" "+data.getName() + " = "+(byVal? "*":"")+"(("+castTypeName+") generic_data);\n";
+ String dataArg = ", "+data.getName();
+ String typedArgList = ", "+typeName+" "+data.getName();
+
+ return new String[]{dataArg, typedData, typedArgList};
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
index ba1eae7a7..80f06f6da 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
@@ -1,116 +1,116 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.generator.c.gen
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.etrice.core.room.DataClass
-import org.eclipse.etrice.generator.base.ILogger
-import org.eclipse.etrice.generator.etricegen.Root
-import org.eclipse.xtext.generator.JavaIoFileSystemAccess
-import org.eclipse.etrice.generator.extensions.RoomExtensions
-import org.eclipse.etrice.generator.generic.ProcedureHelpers
-
-
-@Singleton
-class DataClassGen {
-
- @Inject extension JavaIoFileSystemAccess fileAccess
- @Inject extension CExtensions stdExt
- @Inject extension RoomExtensions roomExt
- @Inject extension ProcedureHelpers helpers
- @Inject ILogger logger
-
- def doGenerate(Root root) {
- for (dc: root.usedDataClasses) {
- var path = dc.generationTargetPath+dc.getPath
-
- // header file
- logger.logInfo("generating DataClass header '"+dc.getCHeaderFileName+"' in '"+path+"'")
- fileAccess.setOutputPath(path)
- fileAccess.generateFile(dc.getCHeaderFileName, root.generateHeaderFile(dc))
-
- // source file
- logger.logInfo("generating DataClass source '"+dc.getCSourceFileName+"' in '"+path+"'")
- fileAccess.setOutputPath(path)
- fileAccess.generateFile(dc.getCSourceFileName, root.generateSourceFile(dc))
-
- }
- }
-
- def generateHeaderFile(Root root, DataClass dc) {'''
- /**
- * @author generated by eTrice
- *
- * Header File of DataClass «dc.name»
- *
- */
-
- «generateIncludeGuardBegin(dc.name)»
-
- #include "etDatatypes.h"
-
-««« TODO: includes only for used DataClasses, also for other models
- «FOR dataClass : root.getReferencedDataClasses(dc)»
- #include "«dataClass.name».h"
- «ENDFOR»
-
- «helpers.userCode(dc.userCode1)»
-
- typedef struct {
- »«helpers.attributes(dc.allAttributes)»
- } «dc.name»
-
-««« TODO: do we need setters and getters for C and C++ ?
-
- «helpers.operationsDeclaration(dc.operations, dc.name)»
-
- /* deep copy */
- void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target);
-
- «helpers.userCode(dc.userCode2)»
-
- «generateIncludeGuardEnd(dc.name)»
-
- '''
- }
-
- def generateSourceFile(Root root, DataClass dc) {'''
- /**
- * @author generated by eTrice
- *
- * Source File of DataClass «dc.name»
- *
- */
-
- #include "«dc.getCHeaderFileName»"
-
- #include <string.h>
-
- «helpers.userCode(dc.userCode3)»
-
-««« TODO: do we need setters and getters for C and C++ ?
-
- «helpers.operationsImplementation(dc.operations, dc.name)»
-
- // deep copy
- void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target) {
- memcpy(target, source, sizeof(«dc.name»));
- }
-
-
- '''}
-
-
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.c.gen
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.etrice.core.room.DataClass
+import org.eclipse.etrice.generator.base.ILogger
+import org.eclipse.etrice.generator.etricegen.Root
+import org.eclipse.xtext.generator.JavaIoFileSystemAccess
+import org.eclipse.etrice.generator.extensions.RoomExtensions
+import org.eclipse.etrice.generator.generic.ProcedureHelpers
+
+
+@Singleton
+class DataClassGen {
+
+ @Inject extension JavaIoFileSystemAccess fileAccess
+ @Inject extension CExtensions stdExt
+ @Inject extension RoomExtensions roomExt
+ @Inject extension ProcedureHelpers helpers
+ @Inject ILogger logger
+
+ def doGenerate(Root root) {
+ for (dc: root.usedDataClasses) {
+ var path = dc.generationTargetPath+dc.getPath
+
+ // header file
+ logger.logInfo("generating DataClass header '"+dc.getCHeaderFileName+"' in '"+path+"'")
+ fileAccess.setOutputPath(path)
+ fileAccess.generateFile(dc.getCHeaderFileName, root.generateHeaderFile(dc))
+
+ // source file
+ logger.logInfo("generating DataClass source '"+dc.getCSourceFileName+"' in '"+path+"'")
+ fileAccess.setOutputPath(path)
+ fileAccess.generateFile(dc.getCSourceFileName, root.generateSourceFile(dc))
+
+ }
+ }
+
+ def generateHeaderFile(Root root, DataClass dc) {'''
+ /**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass «dc.name»
+ *
+ */
+
+ «generateIncludeGuardBegin(dc.name)»
+
+ #include "etDatatypes.h"
+
+««« TODO: includes only for used DataClasses, also for other models
+ «FOR dataClass : root.getReferencedDataClasses(dc)»
+ #include "«dataClass.name».h"
+ «ENDFOR»
+
+ «helpers.userCode(dc.userCode1)»
+
+ typedef struct {
+ «helpers.attributes(dc.allAttributes)»
+ } «dc.name»;
+
+««« TODO: do we need setters and getters for C and C++ ?
+
+ «helpers.operationsDeclaration(dc.operations, dc.name)»
+
+ /* deep copy */
+ void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target);
+
+ «helpers.userCode(dc.userCode2)»
+
+ «generateIncludeGuardEnd(dc.name)»
+
+ '''
+ }
+
+ def generateSourceFile(Root root, DataClass dc) {'''
+ /**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass «dc.name»
+ *
+ */
+
+ #include "«dc.getCHeaderFileName»"
+
+ #include <string.h>
+
+ «helpers.userCode(dc.userCode3)»
+
+««« TODO: do we need setters and getters for C and C++ ?
+
+ «helpers.operationsImplementation(dc.operations, dc.name)»
+
+ // deep copy
+ void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target) {
+ memcpy(target, source, sizeof(«dc.name»));
+ }
+
+
+ '''}
+
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
index d4ecf5e36..9934fcfea 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
@@ -64,7 +64,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«generateIncludeGuardBegin(pc.name)»
#include "etDatatypes.h"
- #include "etPort.h"
+ #include "modelbase/etPort.h"
«helpers.userCode(pc.userCode1)»
@@ -102,7 +102,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
*/
#include "«pc.getCHeaderFileName»"
- #include "etMSCLogger.h"
+ #include "debugging/etMSCLogger.h"
«helpers.userCode(pc.userCode3)»
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
index ce83ef9c1..a1fc872c6 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
@@ -111,8 +111,8 @@ class SubSystemClassGen {
#include "«ssc.getInstSourceFileName»"
#include "«ssc.getDispSourceFileName»"
- #include "etLogger.h"
- #include "etMSCLogger.h"
+ #include "debugging/etLogger.h"
+ #include "debugging/etMSCLogger.h"
«helpers.userCode(ssc.userCode3)»
@@ -187,14 +187,11 @@ class SubSystemClassGen {
* - configuration of data and connection of ports
*/
- #include "etMessageService.h"
+ #include "messaging/etMessageService.h"
+ #include "platform/etMemory.h"
/* instantiation of message services */
- /* pool and block size */
- #define MESSAGE_POOL_MAX 10
- #define MESSAGE_BLOCK_SIZE 32
-
/* MessageService for Thread1 */
static uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
static etMessageService msgService_Thread1;
@@ -310,9 +307,9 @@ class SubSystemClassGen {
* - one generated dispatcher for each MessageService (Thread)
*/
- #include "etMessageReceiver.h"
- #include "etLogger.h"
- #include "etMSCLogger.h"
+ #include "messaging/etMessageReceiver.h"
+ #include "debugging/etLogger.h"
+ #include "debugging/etMSCLogger.h"
static void MsgDispatcher_Thread1_receiveMessage(const etMessage* msg){
ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_Thread1", "receiveMessage")
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.xtend
index 740c0b0f9..72d95f03d 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.xtend
@@ -45,8 +45,9 @@ class SubSystemRunnerGen {
#include "«ssi.name».h"
- #include "etLogger.h"
- #include "etMSCLogger.h"
+ #include "debugging/etLogger.h"
+ #include "debugging/etMSCLogger.h"
+ #include "platform/etPlatform.h"
/**
@@ -55,7 +56,8 @@ class SubSystemRunnerGen {
*/
int main(void) {
-
+ etUserEntry(); /* platform specific */
+
etLogger_logInfo("*** T H E B E G I N ***");
ET_MSC_LOGGER_OPEN("main");
@@ -63,9 +65,13 @@ class SubSystemRunnerGen {
«ssi.name»_init(); /* lifecycle init */
«ssi.name»_start(); /* lifecycle start */
+ etUserPreRun(); /* platform specific */
+
/* run Scheduler */
«ssi.name»_run();
+ etUserPostRun(); /* platform specific */
+
/* shutdown sequence of lifecycle */
«ssi.name»_stop(); /* lifecycle stop */
«ssi.name»_destroy(); /* lifecycle destroy */
@@ -73,6 +79,8 @@ class SubSystemRunnerGen {
ET_MSC_LOGGER_CLOSE
etLogger_logInfo("*** T H E E N D ***");
+ etUserExit(); /* platform specific */
+
return 0;
}
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
index ef3849a1b..5adccb9ec 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
@@ -16,9 +16,11 @@ import org.eclipse.etrice.generator.base.AbstractGenerator;
import org.eclipse.etrice.generator.base.GeneratorBaseModule;
import org.eclipse.etrice.generator.base.ITranslationProvider;
import org.eclipse.etrice.generator.c.Main;
+import org.eclipse.etrice.generator.c.gen.CLanguageGenerator;
import org.eclipse.etrice.generator.c.gen.CTranslationProvider;
import org.eclipse.etrice.generator.c.gen.MainGen;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.etrice.generator.c.gen.CExtensions;
@@ -35,6 +37,7 @@ public class GeneratorModule extends GeneratorBaseModule {
// bind language specific code to generic Interfaces
binder.bind(ILanguageExtension.class).to(CExtensions.class);
+ binder.bind(AbstractLanguageGenerator.class).to(CLanguageGenerator.class);
binder.bind(ITranslationProvider.class).to(CTranslationProvider.class);
}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
index 38cf9fef9..901c01e79 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
@@ -156,7 +156,7 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.newLine();
_builder.append("#include \"etDatatypes.h\"");
_builder.newLine();
- _builder.append("#include \"etMessage.h\"");
+ _builder.append("#include \"messaging/etMessage.h\"");
_builder.newLine();
_builder.newLine();
{
@@ -359,11 +359,13 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.append("\"");
_builder.newLineIfNotEmpty();
_builder.newLine();
- _builder.append("#include \"etActor.h\"");
+ _builder.append("#include \"modelbase/etActor.h\"");
_builder.newLine();
- _builder.append("#include \"etLogger.h\"");
+ _builder.append("#include \"debugging/etLogger.h\"");
_builder.newLine();
- _builder.append("#include \"etMSCLogger.h\"");
+ _builder.append("#include \"debugging/etMSCLogger.h\"");
+ _builder.newLine();
+ _builder.append("#include \"platform/etMemory.h\"");
_builder.newLine();
_builder.newLine();
{
@@ -444,7 +446,7 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
- _builder.append("receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(&msg[1]));");
+ _builder.append("receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));");
_builder.newLine();
}
}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
deleted file mode 100644
index 98bee5eaf..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.RoomClass;
-import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.generator.etricegen.TransitionChain;
-import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.etrice.generator.generic.LanguageGenerator;
-import org.eclipse.xtext.util.Pair;
-import org.eclipse.xtext.xbase.lib.StringExtensions;
-import org.eclipse.xtext.xtend2.lib.StringConcatenation;
-
-@SuppressWarnings("all")
-@Singleton
-public class CExtensions implements ILanguageExtension {
- @Inject
- private LanguageGenerator languageGen;
-
- public String getTypedDataDefinition(final Message m) {
- String _typedData = this.languageGen.getTypedData(m);
- return _typedData;
- }
-
- public String accessLevelPrivate() {
- return "static ";
- }
-
- public String accessLevelProtected() {
- return "static ";
- }
-
- public String accessLevelPublic() {
- return "";
- }
-
- public String memberAccess() {
- return "self->";
- }
-
- public String selfPointer(final String classname, final boolean hasArgs) {
- String _xifexpression = null;
- if (hasArgs) {
- _xifexpression = "* self, ";
- } else {
- _xifexpression = "* self";
- }
- String _operator_plus = StringExtensions.operator_plus(classname, _xifexpression);
- return _operator_plus;
- }
-
- public String selfPointer(final boolean hasArgs) {
- String _xifexpression = null;
- if (hasArgs) {
- _xifexpression = "self, ";
- } else {
- _xifexpression = "self";
- }
- return _xifexpression;
- }
-
- public String operationScope(final String classname, final boolean isDeclaration) {
- String _operator_plus = StringExtensions.operator_plus(classname, "_");
- return _operator_plus;
- }
-
- public String memberInDeclaration(final String namespace, final String member) {
- String _operator_plus = StringExtensions.operator_plus(namespace, "_");
- String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, member);
- return _operator_plus_1;
- }
-
- public String memberInUse(final String namespace, final String member) {
- String _operator_plus = StringExtensions.operator_plus(namespace, "_");
- String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, member);
- return _operator_plus_1;
- }
-
- /**
- * TODO: move specific code elsewhere
- */
- public String getCHeaderFileName(final RoomClass rc) {
- String _name = rc.getName();
- String _operator_plus = StringExtensions.operator_plus(_name, ".h");
- return _operator_plus;
- }
-
- public String getCSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- String _operator_plus = StringExtensions.operator_plus(_name, ".c");
- return _operator_plus;
- }
-
- public String getInstSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- String _operator_plus = StringExtensions.operator_plus(_name, "_Inst.h");
- return _operator_plus;
- }
-
- public String getDispSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- String _operator_plus = StringExtensions.operator_plus(_name, "_Disp.h");
- return _operator_plus;
- }
-
- public StringConcatenation getIncludeGuardString(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("_");
- String _upperCase = filename.toUpperCase();
- _builder.append(_upperCase, "");
- _builder.append("_H_");
- return _builder;
- }
-
- public StringConcatenation generateIncludeGuardBegin(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("#ifndef ");
- StringConcatenation _includeGuardString = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString, "");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- StringConcatenation _includeGuardString_1 = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString_1, "");
- _builder.newLineIfNotEmpty();
- return _builder;
- }
-
- public StringConcatenation generateIncludeGuardEnd(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("#endif /* ");
- StringConcatenation _includeGuardString = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- return _builder;
- }
-
- public boolean usesInheritance() {
- return false;
- }
-
- public String genEnumeration(final String name, final List<Pair<String,String>> entries) {
- String _xblockexpression = null;
- {
- boolean _isEmpty = entries.isEmpty();
- if (_isEmpty) {
- return "/* empty enum not generated */";
- }
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("enum ");
- _builder.append(name, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- {
- boolean hasAnyElements = false;
- for(final Pair<String,String> entry : entries) {
- if (!hasAnyElements) {
- hasAnyElements = true;
- } else {
- _builder.appendImmediate(",", " ");
- }
- _builder.append("\t");
- String _first = entry.getFirst();
- _builder.append(_first, " ");
- _builder.append(" = ");
- String _second = entry.getSecond();
- _builder.append(_second, " ");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("};");
- _builder.newLine();
- String _string = _builder.toString();
- _xblockexpression = (_string);
- }
- return _xblockexpression;
- }
-
- public String booleanConstant(final boolean b) {
- String _xifexpression = null;
- if (b) {
- _xifexpression = "TRUE";
- } else {
- _xifexpression = "FALSE";
- }
- return _xifexpression;
- }
-
- public String nullPointer() {
- return "NULL";
- }
-
- public String voidPointer() {
- return "void*";
- }
-
- public String getExecuteChainCode(final ExpandedActorClass ac, final TransitionChain tc) {
- String _executeChain = this.languageGen.getExecuteChain(ac, tc);
- return _executeChain;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
index 2dbbb5e4b..cfd16ac7a 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
@@ -118,7 +118,6 @@ public class DataClassGen {
_builder.append("typedef struct {");
_builder.newLine();
_builder.append("\t");
- _builder.append("\u00BB");
List<Attribute> _allAttributes = this.roomExt.getAllAttributes(dc);
StringConcatenation _attributes = this.helpers.attributes(_allAttributes);
_builder.append(_attributes, " ");
@@ -126,6 +125,7 @@ public class DataClassGen {
_builder.append("} ");
String _name_3 = dc.getName();
_builder.append(_name_3, "");
+ _builder.append(";");
_builder.newLineIfNotEmpty();
_builder.newLine();
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
index 2d0f17ed9..e66b042f0 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
@@ -108,7 +108,7 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
_builder.append("#include \"etDatatypes.h\"");
_builder.newLine();
- _builder.append("#include \"etPort.h\"");
+ _builder.append("#include \"modelbase/etPort.h\"");
_builder.newLine();
_builder.newLine();
DetailCode _userCode1 = pc.getUserCode1();
@@ -193,7 +193,7 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.append(_cHeaderFileName, "");
_builder.append("\"");
_builder.newLineIfNotEmpty();
- _builder.append("#include \"etMSCLogger.h\"");
+ _builder.append("#include \"debugging/etMSCLogger.h\"");
_builder.newLine();
_builder.newLine();
DetailCode _userCode3 = pc.getUserCode3();
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java
index 3ea4f0c18..1a508a747 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java
@@ -237,9 +237,9 @@ public class SubSystemClassGen {
_builder.append("\"");
_builder.newLineIfNotEmpty();
_builder.newLine();
- _builder.append("#include \"etLogger.h\"");
+ _builder.append("#include \"debugging/etLogger.h\"");
_builder.newLine();
- _builder.append("#include \"etMSCLogger.h\"");
+ _builder.append("#include \"debugging/etMSCLogger.h\"");
_builder.newLine();
_builder.newLine();
_builder.newLine();
@@ -477,17 +477,12 @@ public class SubSystemClassGen {
_builder.append("*/");
_builder.newLine();
_builder.newLine();
- _builder.append("#include \"etMessageService.h\"");
+ _builder.append("#include \"messaging/etMessageService.h\"");
_builder.newLine();
+ _builder.append("#include \"platform/etMemory.h\"");
_builder.newLine();
- _builder.append("/* instantiation of message services */");
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* pool and block size */");
_builder.newLine();
- _builder.append("#define MESSAGE_POOL_MAX 10");
- _builder.newLine();
- _builder.append("#define MESSAGE_BLOCK_SIZE 32");
+ _builder.append("/* instantiation of message services */");
_builder.newLine();
_builder.newLine();
_builder.append("/* MessageService for Thread1 */");
@@ -870,11 +865,11 @@ public class SubSystemClassGen {
_builder.append("*/");
_builder.newLine();
_builder.newLine();
- _builder.append("#include \"etMessageReceiver.h\"");
+ _builder.append("#include \"messaging/etMessageReceiver.h\"");
_builder.newLine();
- _builder.append("#include \"etLogger.h\"");
+ _builder.append("#include \"debugging/etLogger.h\"");
_builder.newLine();
- _builder.append("#include \"etMSCLogger.h\"");
+ _builder.append("#include \"debugging/etMSCLogger.h\"");
_builder.newLine();
_builder.newLine();
_builder.append("static void MsgDispatcher_Thread1_receiveMessage(const etMessage* msg){");
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java
index 125f76155..11ba80213 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java
@@ -71,9 +71,11 @@ public class SubSystemRunnerGen {
_builder.append(".h\"");
_builder.newLineIfNotEmpty();
_builder.newLine();
- _builder.append("#include \"etLogger.h\"");
+ _builder.append("#include \"debugging/etLogger.h\"");
_builder.newLine();
- _builder.append("#include \"etMSCLogger.h\"");
+ _builder.append("#include \"debugging/etMSCLogger.h\"");
+ _builder.newLine();
+ _builder.append("#include \"platform/etPlatform.h\"");
_builder.newLine();
_builder.newLine();
_builder.newLine();
@@ -91,6 +93,10 @@ public class SubSystemRunnerGen {
_builder.newLine();
_builder.append("int main(void) {");
_builder.newLine();
+ _builder.append("\t");
+ _builder.append("etUserEntry(); /* platform specific */");
+ _builder.newLine();
+ _builder.append("\t");
_builder.newLine();
_builder.append("\t");
_builder.append("etLogger_logInfo(\"*** T H E B E G I N ***\");");
@@ -114,6 +120,10 @@ public class SubSystemRunnerGen {
_builder.newLineIfNotEmpty();
_builder.newLine();
_builder.append("\t");
+ _builder.append("etUserPreRun(); /* platform specific */");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("\t");
_builder.append("/* run Scheduler */");
_builder.newLine();
_builder.append("\t");
@@ -123,6 +133,10 @@ public class SubSystemRunnerGen {
_builder.newLineIfNotEmpty();
_builder.newLine();
_builder.append("\t");
+ _builder.append("etUserPostRun(); /* platform specific */");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("\t");
_builder.append("/* shutdown sequence of lifecycle */");
_builder.newLine();
_builder.append("\t");
@@ -144,6 +158,10 @@ public class SubSystemRunnerGen {
_builder.newLine();
_builder.newLine();
_builder.append("\t");
+ _builder.append("etUserExit(); /* platform specific */");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("\t");
_builder.append("return 0;");
_builder.newLine();
_builder.append("}");
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaExtensions.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaExtensions.xtend
index 51a8bd24d..f37afe00c 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaExtensions.xtend
@@ -23,8 +23,8 @@ import org.eclipse.etrice.core.room.RoomClass
import org.eclipse.etrice.core.room.Message
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass
import org.eclipse.etrice.generator.etricegen.TransitionChain
-import org.eclipse.etrice.generator.generic.LanguageGenerator
import org.eclipse.etrice.generator.generic.ILanguageExtension
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator
import java.util.List
import org.eclipse.xtext.util.Pair
@@ -32,7 +32,7 @@ import org.eclipse.xtext.util.Pair
@Singleton
class JavaExtensions implements ILanguageExtension {
- @Inject LanguageGenerator languageGen
+ @Inject AbstractLanguageGenerator languageGen
override String getTypedDataDefinition(Message m) {
@@ -86,4 +86,8 @@ class JavaExtensions implements ILanguageExtension {
def String getExecuteChainCode(ExpandedActorClass ac, TransitionChain tc) {
return languageGen.getExecuteChain(ac, tc)
}
-} \ No newline at end of file
+
+ override String arrayDeclaration(String type, int size, String name) {
+ type+" "+name+"[]";
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaLanguageGenerator.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaLanguageGenerator.java
new file mode 100644
index 000000000..02feb7c0b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/JavaLanguageGenerator.java
@@ -0,0 +1,30 @@
+package org.eclipse.etrice.generator.java.gen;
+
+import org.eclipse.etrice.core.room.PrimitiveType;
+import org.eclipse.etrice.core.room.VarDecl;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
+
+public class JavaLanguageGenerator extends AbstractLanguageGenerator {
+
+ @Override
+ public String[] getArglistAndTypedData(VarDecl data) {
+ if (data==null)
+ return new String[] {"", "", ""};
+
+ String typeName = data.getRefType().getType().getName();
+ String castTypeName = typeName;
+ if (data.getRefType().getType() instanceof PrimitiveType) {
+ typeName = ((PrimitiveType)data.getRefType().getType()).getTargetName();
+ String ct = ((PrimitiveType)data.getRefType().getType()).getCastName();
+ if (ct!=null && !ct.isEmpty())
+ castTypeName = ct;
+ }
+
+ String typedData = typeName+" "+data.getName() + " = ("+castTypeName+") generic_data;\n";
+ String dataArg = ", "+data.getName();
+ String typedArgList = ", "+typeName+" "+data.getName();
+
+ return new String[]{dataArg, typedData, typedArgList};
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
index ded007498..e0d3f981a 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
@@ -88,21 +88,23 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
'''
}
- def portClass(ProtocolClass pc, Boolean conj) {'''
- «var name = pc.getPortClassName(conj)»
- «var pclass = pc.getPortClass(conj)»
+ def portClass(ProtocolClass pc, Boolean conj) {
+ var pclass = pc.getPortClass(conj)
+ var portClassName = pc.getPortClassName(conj)
+ var replPortClassName = pc.getPortClassName(conj, true)
+ '''
// port class
- static public class «name» extends PortBase {
+ static public class «portClassName» extends PortBase {
«IF pclass!=null»
«helpers.userCode(pclass.userCode)»
«ENDIF»
// constructors
- public «name»(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {
+ public «portClassName»(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {
super(actor, name, localId, 0, addr, peerAddress);
DebuggingService.getInstance().addPortInstance(this);
}
- public «name»(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {
+ public «portClassName»(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {
super(actor, name, localId, idx, addr, peerAddress);
DebuggingService.getInstance().addPortInstance(this);
}
@@ -144,7 +146,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«IF pclass!=null»
«helpers.attributes(pclass.attributes)»
- «helpers.operationsImplementation(pclass.operations, name)»
+ «helpers.operationsImplementation(pclass.operations, portClassName)»
«ENDIF»
// sent messages
@@ -154,16 +156,16 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
}
// replicated port class
- static public class «name»Repl {
- private ArrayList<«name»> ports;
+ static public class «replPortClassName» {
+ private ArrayList<«portClassName»> ports;
private int replication;
- public «name»Repl(IEventReceiver actor, String name, int localId, Address[] addr,
+ public «replPortClassName»(IEventReceiver actor, String name, int localId, Address[] addr,
Address[] peerAddress) {
replication = addr.length;
- ports = new ArrayList<«pc.name».«name»>(replication);
+ ports = new ArrayList<«pc.name».«portClassName»>(replication);
for (int i=0; i<replication; ++i) {
- ports.add(new «name»(
+ ports.add(new «portClassName»(
actor, name+i, localId, i, addr[i], peerAddress[i]));
}
}
@@ -176,7 +178,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
return ifitem.getIdx();
}
- public «name» get(int i) {
+ public «portClassName» get(int i) {
return ports.get(i);
}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java
index b5518d6d8..4c604f41e 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java
@@ -17,9 +17,11 @@ import org.eclipse.etrice.generator.base.DefaultTranslationProvider;
import org.eclipse.etrice.generator.base.GeneratorBaseModule;
import org.eclipse.etrice.generator.base.ITranslationProvider;
import org.eclipse.etrice.generator.java.Main;
+import org.eclipse.etrice.generator.java.gen.JavaLanguageGenerator;
import org.eclipse.etrice.generator.java.gen.MainGen;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
import org.eclipse.etrice.generator.java.gen.JavaExtensions;
@@ -39,6 +41,7 @@ public class GeneratorModule extends GeneratorBaseModule {
// bind language specific code to generic Interfaces
binder.bind(ILanguageExtension.class).to(JavaExtensions.class);
+ binder.bind(AbstractLanguageGenerator.class).to(JavaLanguageGenerator.class);
}
}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java
deleted file mode 100644
index 04905d5dd..000000000
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.etrice.generator.java.gen;
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.RoomClass;
-import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.generator.etricegen.TransitionChain;
-import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.etrice.generator.generic.LanguageGenerator;
-import org.eclipse.xtext.util.Pair;
-import org.eclipse.xtext.xbase.lib.StringExtensions;
-import org.eclipse.xtext.xtend2.lib.StringConcatenation;
-
-@SuppressWarnings("all")
-@Singleton
-public class JavaExtensions implements ILanguageExtension {
- @Inject
- private LanguageGenerator languageGen;
-
- public String getTypedDataDefinition(final Message m) {
- String _typedData = this.languageGen.getTypedData(m);
- return _typedData;
- }
-
- public String getJavaFileName(final RoomClass rc) {
- String _name = rc.getName();
- String _operator_plus = StringExtensions.operator_plus(_name, ".java");
- return _operator_plus;
- }
-
- public String accessLevelPrivate() {
- return "private ";
- }
-
- public String accessLevelProtected() {
- return "protected ";
- }
-
- public String accessLevelPublic() {
- return "public ";
- }
-
- public String memberAccess() {
- return "this.";
- }
-
- public String selfPointer(final String classname, final boolean hasArgs) {
- return "";
- }
-
- public String selfPointer(final boolean hasArgs) {
- return "";
- }
-
- public String operationScope(final String classname, final boolean isDeclaration) {
- return "";
- }
-
- public String memberInDeclaration(final String namespace, final String member) {
- return member;
- }
-
- public String memberInUse(final String namespace, final String member) {
- String _operator_plus = StringExtensions.operator_plus(namespace, ".");
- String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, member);
- return _operator_plus_1;
- }
-
- public boolean usesInheritance() {
- return true;
- }
-
- public String genEnumeration(final String name, final List<Pair<String,String>> entries) {
- StringConcatenation _builder = new StringConcatenation();
- {
- for(final Pair<String,String> entry : entries) {
- _builder.append("public static final int ");
- String _first = entry.getFirst();
- _builder.append(_first, "");
- _builder.append(" = ");
- String _second = entry.getSecond();
- _builder.append(_second, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- String _string = _builder.toString();
- return _string;
- }
-
- public String booleanConstant(final boolean b) {
- String _string = ((Boolean)b).toString();
- return _string;
- }
-
- public String nullPointer() {
- return "null";
- }
-
- public String voidPointer() {
- return "Object";
- }
-
- public String getExecuteChainCode(final ExpandedActorClass ac, final TransitionChain tc) {
- String _executeChain = this.languageGen.getExecuteChain(ac, tc);
- return _executeChain;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
index a7e5011a1..2e108a505 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
@@ -197,361 +197,365 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
}
public StringConcatenation portClass(final ProtocolClass pc, final Boolean conj) {
- StringConcatenation _builder = new StringConcatenation();
- String _portClassName = this.roomExt.getPortClassName(pc, conj);
- String name = _portClassName;
- _builder.newLineIfNotEmpty();
- PortClass _portClass = this.roomExt.getPortClass(pc, conj);
- PortClass pclass = _portClass;
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("// port class");
- _builder.newLine();
- _builder.append("static public class ");
- _builder.append(name, "");
- _builder.append(" extends PortBase {");
- _builder.newLineIfNotEmpty();
+ StringConcatenation _xblockexpression = null;
{
- boolean _operator_notEquals = ObjectExtensions.operator_notEquals(pclass, null);
- if (_operator_notEquals) {
- _builder.append("\t");
- DetailCode _userCode = pclass.getUserCode();
- StringConcatenation _userCode_1 = this.helpers.userCode(_userCode);
- _builder.append(_userCode_1, " ");
- _builder.newLineIfNotEmpty();
+ PortClass _portClass = this.roomExt.getPortClass(pc, conj);
+ PortClass pclass = _portClass;
+ String _portClassName = this.roomExt.getPortClassName(pc, conj);
+ String portClassName = _portClassName;
+ String _portClassName_1 = this.roomExt.getPortClassName(pc, conj, true);
+ String replPortClassName = _portClassName_1;
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.newLine();
+ _builder.append("// port class");
+ _builder.newLine();
+ _builder.append("static public class ");
+ _builder.append(portClassName, "");
+ _builder.append(" extends PortBase {");
+ _builder.newLineIfNotEmpty();
+ {
+ boolean _operator_notEquals = ObjectExtensions.operator_notEquals(pclass, null);
+ if (_operator_notEquals) {
+ _builder.append("\t");
+ DetailCode _userCode = pclass.getUserCode();
+ StringConcatenation _userCode_1 = this.helpers.userCode(_userCode);
+ _builder.append(_userCode_1, " ");
+ _builder.newLineIfNotEmpty();
+ }
}
- }
- _builder.append("\t");
- _builder.append("// constructors");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public ");
- _builder.append(name, " ");
- _builder.append("(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("super(actor, name, localId, 0, addr, peerAddress);");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("DebuggingService.getInstance().addPortInstance(this);");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public ");
- _builder.append(name, " ");
- _builder.append("(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("super(actor, name, localId, idx, addr, peerAddress);");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("DebuggingService.getInstance().addPortInstance(this);");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("@Override");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public void receive(Message m) {");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("if (!(m instanceof EventMessage))");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("return;");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("EventMessage msg = (EventMessage) m;");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX)");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("System.out.println(\"unknown\");");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("else {");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("if (messageStrings[msg.getEvtId()] != \"timerTick\"){");
- _builder.newLine();
- _builder.append("\t\t\t\t\t");
- _builder.append("DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("}");
- _builder.newLine();
- {
- boolean _handlesReceive = this.roomExt.handlesReceive(pc, conj);
- if (_handlesReceive) {
- _builder.append("\t\t\t\t");
- _builder.append("switch (msg.getEvtId()) {");
- _builder.newLine();
- {
- List<MessageHandler> _receiveHandlers = this.roomExt.getReceiveHandlers(pc, conj);
- for(final MessageHandler hdlr : _receiveHandlers) {
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("case ");
- Message _msg = hdlr.getMsg();
- String _codeName = this.roomExt.getCodeName(_msg);
- _builder.append(_codeName, " ");
- _builder.append(":");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("{");
- _builder.newLine();
- {
- DetailCode _detailCode = hdlr.getDetailCode();
- EList<String> _commands = _detailCode.getCommands();
- for(final String command : _commands) {
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append(command, " ");
- _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("// constructors");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public ");
+ _builder.append(portClassName, " ");
+ _builder.append("(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("super(actor, name, localId, 0, addr, peerAddress);");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("DebuggingService.getInstance().addPortInstance(this);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public ");
+ _builder.append(portClassName, " ");
+ _builder.append("(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("super(actor, name, localId, idx, addr, peerAddress);");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("DebuggingService.getInstance().addPortInstance(this);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("@Override");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public void receive(Message m) {");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("if (!(m instanceof EventMessage))");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("return;");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("EventMessage msg = (EventMessage) m;");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX)");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("System.out.println(\"unknown\");");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("else {");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("if (messageStrings[msg.getEvtId()] != \"timerTick\"){");
+ _builder.newLine();
+ _builder.append("\t\t\t\t\t");
+ _builder.append("DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ {
+ boolean _handlesReceive = this.roomExt.handlesReceive(pc, conj);
+ if (_handlesReceive) {
+ _builder.append("\t\t\t\t");
+ _builder.append("switch (msg.getEvtId()) {");
+ _builder.newLine();
+ {
+ List<MessageHandler> _receiveHandlers = this.roomExt.getReceiveHandlers(pc, conj);
+ for(final MessageHandler hdlr : _receiveHandlers) {
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("case ");
+ Message _msg = hdlr.getMsg();
+ String _codeName = this.roomExt.getCodeName(_msg);
+ _builder.append(_codeName, " ");
+ _builder.append(":");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("{");
+ _builder.newLine();
+ {
+ DetailCode _detailCode = hdlr.getDetailCode();
+ EList<String> _commands = _detailCode.getCommands();
+ for(final String command : _commands) {
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append(command, " ");
+ _builder.newLineIfNotEmpty();
+ }
}
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("break;");
+ _builder.newLine();
}
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("break;");
- _builder.newLine();
}
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("default:");
+ _builder.newLine();
}
- _builder.append("\t\t\t\t");
- _builder.append("\t");
- _builder.append("default:");
- _builder.newLine();
}
- }
- _builder.append("\t\t\t\t\t");
- _builder.append("if (msg instanceof EventWithDataMessage)");
- _builder.newLine();
- _builder.append("\t\t\t\t\t\t");
- _builder.append("getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());");
- _builder.newLine();
- _builder.append("\t\t\t\t\t");
- _builder.append("else");
- _builder.newLine();
- _builder.append("\t\t\t\t\t\t");
- _builder.append("getActor().receiveEvent(this, msg.getEvtId(), null);");
- _builder.newLine();
- {
- boolean _handlesReceive_1 = this.roomExt.handlesReceive(pc, conj);
- if (_handlesReceive_1) {
- _builder.append("\t\t\t\t");
- _builder.append("}");
- _builder.newLine();
+ _builder.append("\t\t\t\t\t");
+ _builder.append("if (msg instanceof EventWithDataMessage)");
+ _builder.newLine();
+ _builder.append("\t\t\t\t\t\t");
+ _builder.append("getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());");
+ _builder.newLine();
+ _builder.append("\t\t\t\t\t");
+ _builder.append("else");
+ _builder.newLine();
+ _builder.append("\t\t\t\t\t\t");
+ _builder.append("getActor().receiveEvent(this, msg.getEvtId(), null);");
+ _builder.newLine();
+ {
+ boolean _handlesReceive_1 = this.roomExt.handlesReceive(pc, conj);
+ if (_handlesReceive_1) {
+ _builder.append("\t\t\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
}
- }
- _builder.append("\t\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- {
- boolean _operator_notEquals_1 = ObjectExtensions.operator_notEquals(pclass, null);
- if (_operator_notEquals_1) {
- _builder.append("\t");
- EList<Attribute> _attributes = pclass.getAttributes();
- StringConcatenation _attributes_1 = this.helpers.attributes(_attributes);
- _builder.append(_attributes_1, " ");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- EList<PortOperation> _operations = pclass.getOperations();
- StringConcatenation _operationsImplementation = this.helpers.operationsImplementation(_operations, name);
- _builder.append(_operationsImplementation, " ");
- _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.newLine();
+ {
+ boolean _operator_notEquals_1 = ObjectExtensions.operator_notEquals(pclass, null);
+ if (_operator_notEquals_1) {
+ _builder.append("\t");
+ EList<Attribute> _attributes = pclass.getAttributes();
+ StringConcatenation _attributes_1 = this.helpers.attributes(_attributes);
+ _builder.append(_attributes_1, " ");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ EList<PortOperation> _operations = pclass.getOperations();
+ StringConcatenation _operationsImplementation = this.helpers.operationsImplementation(_operations, portClassName);
+ _builder.append(_operationsImplementation, " ");
+ _builder.newLineIfNotEmpty();
+ }
}
- }
- _builder.append("\t");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("// sent messages");
- _builder.newLine();
- {
- List<Message> _outgoing = this.roomExt.getOutgoing(pc, conj);
- for(final Message m : _outgoing) {
- _builder.append("\t");
- StringConcatenation _sendMessage = this.sendMessage(m, conj);
- _builder.append(_sendMessage, " ");
- _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("// sent messages");
+ _builder.newLine();
+ {
+ List<Message> _outgoing = this.roomExt.getOutgoing(pc, conj);
+ for(final Message m : _outgoing) {
+ _builder.append("\t");
+ StringConcatenation _sendMessage = this.sendMessage(m, conj);
+ _builder.append(_sendMessage, " ");
+ _builder.newLineIfNotEmpty();
+ }
}
- }
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("// replicated port class");
- _builder.newLine();
- _builder.append("static public class ");
- _builder.append(name, "");
- _builder.append("Repl {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("private ArrayList<");
- _builder.append(name, " ");
- _builder.append("> ports;");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("private int replication;");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public ");
- _builder.append(name, " ");
- _builder.append("Repl(IEventReceiver actor, String name, int localId, Address[] addr,");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t\t");
- _builder.append("Address[] peerAddress) {");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("replication = addr.length;");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("ports = new ArrayList<");
- String _name = pc.getName();
- _builder.append(_name, " ");
- _builder.append(".");
- _builder.append(name, " ");
- _builder.append(">(replication);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("for (int i=0; i<replication; ++i) {");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("ports.add(new ");
- _builder.append(name, " ");
- _builder.append("(");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t\t\t\t");
- _builder.append("actor, name+i, localId, i, addr[i], peerAddress[i]));");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public int getReplication() {");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("return replication;");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public int getIndexOf(InterfaceItemBase ifitem){");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("return ifitem.getIdx();");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("public ");
- _builder.append(name, " ");
- _builder.append(" get(int i) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("return ports.get(i);");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.newLine();
- {
- if (conj) {
- _builder.append("\t");
- _builder.append("// incoming messages");
- _builder.newLine();
- {
- List<Message> _allIncomingMessages = this.roomExt.getAllIncomingMessages(pc);
- for(final Message m_1 : _allIncomingMessages) {
- _builder.append("\t");
- StringConcatenation _messageSignature = this.messageSignature(m_1);
- _builder.append(_messageSignature, " ");
- _builder.append("{");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("for (int i=0; i<replication; ++i) {");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("\t\t");
- _builder.append("ports.get(i).");
- StringConcatenation _messageCall = this.messageCall(m_1);
- _builder.append(_messageCall, " ");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
+ _builder.append("}");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("// replicated port class");
+ _builder.newLine();
+ _builder.append("static public class ");
+ _builder.append(replPortClassName, "");
+ _builder.append(" {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("private ArrayList<");
+ _builder.append(portClassName, " ");
+ _builder.append("> ports;");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("private int replication;");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public ");
+ _builder.append(replPortClassName, " ");
+ _builder.append("(IEventReceiver actor, String name, int localId, Address[] addr,");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t");
+ _builder.append("Address[] peerAddress) {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("replication = addr.length;");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("ports = new ArrayList<");
+ String _name = pc.getName();
+ _builder.append(_name, " ");
+ _builder.append(".");
+ _builder.append(portClassName, " ");
+ _builder.append(">(replication);");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("for (int i=0; i<replication; ++i) {");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("ports.add(new ");
+ _builder.append(portClassName, " ");
+ _builder.append("(");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t\t\t");
+ _builder.append("actor, name+i, localId, i, addr[i], peerAddress[i]));");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public int getReplication() {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("return replication;");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public int getIndexOf(InterfaceItemBase ifitem){");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("return ifitem.getIdx();");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public ");
+ _builder.append(portClassName, " ");
+ _builder.append(" get(int i) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("return ports.get(i);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ {
+ if (conj) {
+ _builder.append("\t");
+ _builder.append("// incoming messages");
+ _builder.newLine();
+ {
+ List<Message> _allIncomingMessages = this.roomExt.getAllIncomingMessages(pc);
+ for(final Message m_1 : _allIncomingMessages) {
+ _builder.append("\t");
+ StringConcatenation _messageSignature = this.messageSignature(m_1);
+ _builder.append(_messageSignature, " ");
+ _builder.append("{");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("for (int i=0; i<replication; ++i) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t\t");
+ _builder.append("ports.get(i).");
+ StringConcatenation _messageCall = this.messageCall(m_1);
+ _builder.append(_messageCall, " ");
+ _builder.append(";");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
}
- }
- } else {
- _builder.append("\t");
- _builder.append("// outgoing messages");
- _builder.newLine();
- {
- List<Message> _allOutgoingMessages = this.roomExt.getAllOutgoingMessages(pc);
- for(final Message m_2 : _allOutgoingMessages) {
- _builder.append("\t");
- StringConcatenation _messageSignature_1 = this.messageSignature(m_2);
- _builder.append(_messageSignature_1, " ");
- _builder.append("{");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("for (int i=0; i<replication; ++i) {");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("\t\t");
- _builder.append("ports.get(i).");
- StringConcatenation _messageCall_1 = this.messageCall(m_2);
- _builder.append(_messageCall_1, " ");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
+ } else {
+ _builder.append("\t");
+ _builder.append("// outgoing messages");
+ _builder.newLine();
+ {
+ List<Message> _allOutgoingMessages = this.roomExt.getAllOutgoingMessages(pc);
+ for(final Message m_2 : _allOutgoingMessages) {
+ _builder.append("\t");
+ StringConcatenation _messageSignature_1 = this.messageSignature(m_2);
+ _builder.append(_messageSignature_1, " ");
+ _builder.append("{");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("for (int i=0; i<replication; ++i) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t\t");
+ _builder.append("ports.get(i).");
+ StringConcatenation _messageCall_1 = this.messageCall(m_2);
+ _builder.append(_messageCall_1, " ");
+ _builder.append(";");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
}
}
}
+ _builder.append("}");
+ _builder.newLine();
+ _builder.newLine();
+ _xblockexpression = (_builder);
}
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- return _builder;
+ return _xblockexpression;
}
public StringConcatenation messageSignature(final Message m) {
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageGenerator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/AbstractLanguageGenerator.java
index 3267367a1..d80501d07 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/AbstractLanguageGenerator.java
@@ -15,7 +15,6 @@ package org.eclipse.etrice.generator.generic;
import org.eclipse.etrice.core.room.InitialTransition;
import org.eclipse.etrice.core.room.Message;
import org.eclipse.etrice.core.room.MessageFromIf;
-import org.eclipse.etrice.core.room.PrimitiveType;
import org.eclipse.etrice.core.room.Transition;
import org.eclipse.etrice.core.room.Trigger;
import org.eclipse.etrice.core.room.TriggeredTransition;
@@ -24,11 +23,12 @@ import org.eclipse.etrice.generator.base.AbstractGenerator;
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
import org.eclipse.etrice.generator.etricegen.TransitionChain;
-public class LanguageGenerator {
+public abstract class AbstractLanguageGenerator {
public String getExecuteChain(ExpandedActorClass ac, TransitionChain tc) {
- LanguageTransitionChainVisitor tcv = new LanguageTransitionChainVisitor(ac, tc);
+ LanguageTransitionChainVisitor tcv = new LanguageTransitionChainVisitor(ac);
AbstractGenerator.getInjector().injectMembers(tcv);
+ tcv.init(tc);
return tc.genExecuteChain(tcv);
}
@@ -59,23 +59,5 @@ public class LanguageGenerator {
return getArglistAndTypedData(m.getData())[2];
}
- public String[] getArglistAndTypedData(VarDecl data) {
- if (data==null)
- return new String[] {"", "", ""};
-
- String typeName = data.getRefType().getType().getName();
- String castTypeName = typeName;
- if (data.getRefType().getType() instanceof PrimitiveType) {
- typeName = ((PrimitiveType)data.getRefType().getType()).getTargetName();
- String ct = ((PrimitiveType)data.getRefType().getType()).getCastName();
- if (ct!=null && !ct.isEmpty())
- castTypeName = ct;
- }
-
- String typedData = typeName+" "+data.getName() + " = ("+castTypeName+") generic_data;\n";
- String dataArg = ", "+data.getName();
- String typedArgList = ", "+typeName+" "+data.getName();
-
- return new String[]{dataArg, typedData, typedArgList};
- }
+ public abstract String[] getArglistAndTypedData(VarDecl data);
}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
index 2dbb1de1a..b0023fac1 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
@@ -31,7 +31,7 @@ class GenericStateMachineGenerator {
@Inject public extension ILanguageExtension langExt
@Inject public extension RoomExtensions roomExt
@Inject public extension GenericProtocolClassGenerator pcGen
- @Inject public extension LanguageGenerator languageGen
+ @Inject public extension org.eclipse.etrice.generator.generic.AbstractLanguageGenerator languageGen
@Inject public ITranslationProvider translator
def private genStateIdConstants(ExpandedActorClass xpac, ActorClass ac) {
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ILanguageExtension.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ILanguageExtension.java
index 6195e41e3..b0cfd41c4 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ILanguageExtension.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ILanguageExtension.java
@@ -119,4 +119,13 @@ public interface ILanguageExtension {
* @return void* for C/C++, Object for Java
*/
String voidPointer();
+
+ /**
+ * array declarations differ in Java and C/C++
+ * @param type
+ * @param size
+ * @param name
+ * @return a string that represents the declaration
+ */
+ String arrayDeclaration(String type, int size, String name);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageTransitionChainVisitor.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageTransitionChainVisitor.java
index 233109327..7d5edebd9 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageTransitionChainVisitor.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/LanguageTransitionChainVisitor.java
@@ -29,14 +29,16 @@ import com.google.inject.Inject;
public class LanguageTransitionChainVisitor implements ITransitionChainVisitor {
private ExpandedActorClass ac;
- private LanguageGenerator javaGen = new LanguageGenerator();
- @Inject ILanguageExtension langExt;
+ @Inject private AbstractLanguageGenerator javaGen;
+ @Inject private ILanguageExtension langExt;
private String typedData = "";
private String dataArg = "";
- LanguageTransitionChainVisitor(ExpandedActorClass ac, TransitionChain tc) {
+ LanguageTransitionChainVisitor(ExpandedActorClass ac) {
this.ac = ac;
-
+ }
+
+ void init(TransitionChain tc) {
if (tc.getTransition() instanceof TriggeredTransition) {
// we rely on the previous checking during the generator model creation
VarDecl data = ((TriggeredTransition)tc.getTransition()).getTriggers().get(0).getMsgFromIfPairs().get(0).getMessage().getData();
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
index 3d4ab1f91..552843aea 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
@@ -52,7 +52,7 @@ class ProcedureHelpers {
«IF attribute.size==0»
«attribute.refType.type.typeName» «attribute.name»;
«ELSE»
- «attribute.refType.type.typeName»[] «attribute.name»;
+ «languageExt.arrayDeclaration(attribute.refType.type.typeName, attribute.size, attribute.name)»;
«ENDIF»
«ENDFOR»
'''
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/TypeHelpers.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/TypeHelpers.xtend
index ab0015520..ad2cb629a 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/TypeHelpers.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/TypeHelpers.xtend
@@ -24,13 +24,13 @@ import org.eclipse.etrice.core.room.ExternalType
import org.eclipse.etrice.core.room.PrimitiveType
import org.eclipse.etrice.core.room.VarDecl
import org.eclipse.etrice.core.room.Message
-import org.eclipse.etrice.generator.generic.LanguageGenerator
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator
@Singleton
class TypeHelpers {
- @Inject LanguageGenerator languageGen
+ @Inject AbstractLanguageGenerator languageGen
def String typeName(DataType type) {
if (type instanceof PrimitiveType)
diff --git a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
index cc45783bd..4f0c59f68 100644
--- a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
@@ -23,9 +23,9 @@ import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
import org.eclipse.etrice.generator.etricegen.TransitionChain;
import org.eclipse.etrice.generator.extensions.RoomExtensions;
import org.eclipse.etrice.generator.extensions.RoomNameProv;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
import org.eclipse.etrice.generator.generic.GenericProtocolClassGenerator;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.etrice.generator.generic.LanguageGenerator;
import org.eclipse.xtext.util.Pair;
import org.eclipse.xtext.util.Tuples;
import org.eclipse.xtext.xbase.lib.BooleanExtensions;
@@ -47,7 +47,7 @@ public class GenericStateMachineGenerator {
public GenericProtocolClassGenerator pcGen;
@Inject
- public LanguageGenerator languageGen;
+ public AbstractLanguageGenerator languageGen;
@Inject
public ITranslationProvider translator;
diff --git a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java
index 8306d6875..4ef74b649 100644
--- a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java
+++ b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java
@@ -81,10 +81,10 @@ public class ProcedureHelpers {
RefableType _refType_1 = attribute.getRefType();
DataType _type_1 = _refType_1.getType();
String _typeName_1 = this._typeHelpers.typeName(_type_1);
- _builder.append(_typeName_1, "");
- _builder.append("[] ");
+ int _size_1 = attribute.getSize();
String _name_1 = attribute.getName();
- _builder.append(_name_1, "");
+ String _arrayDeclaration = this.languageExt.arrayDeclaration(_typeName_1, _size_1, _name_1);
+ _builder.append(_arrayDeclaration, "");
_builder.append(";");
_builder.newLineIfNotEmpty();
}
diff --git a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java
index a5adc82ba..32d8572db 100644
--- a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java
+++ b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java
@@ -8,14 +8,14 @@ import org.eclipse.etrice.core.room.Message;
import org.eclipse.etrice.core.room.PrimitiveType;
import org.eclipse.etrice.core.room.RefableType;
import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.generator.generic.LanguageGenerator;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
import org.eclipse.xtext.xbase.lib.StringExtensions;
@SuppressWarnings("all")
@Singleton
public class TypeHelpers {
@Inject
- private LanguageGenerator languageGen;
+ private AbstractLanguageGenerator languageGen;
public String typeName(final DataType type) {
if ((type instanceof PrimitiveType)) {
diff --git a/plugins/org.eclipse.etrice.logging/bin/log4j.properties b/plugins/org.eclipse.etrice.logging/bin/log4j.properties
new file mode 100644
index 000000000..4bb6f37ad
--- /dev/null
+++ b/plugins/org.eclipse.etrice.logging/bin/log4j.properties
@@ -0,0 +1,7 @@
+log4j.rootCategory=INFO, S
+
+log4j.logger.org.eclipse.xtext=INFO
+
+log4j.appender.S = org.apache.log4j.ConsoleAppender
+log4j.appender.S.layout = org.apache.log4j.PatternLayout
+log4j.appender.S.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.zip
index 3fe0d83b9..2fe2588b2 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
index 31fb0f276..a8d15ba15 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
Binary files differ
diff --git a/runtime/org.eclipse.etrice.runtime.c/.cproject b/runtime/org.eclipse.etrice.runtime.c/.cproject
index 40cfcf676..3df281dc8 100644
--- a/runtime/org.eclipse.etrice.runtime.c/.cproject
+++ b/runtime/org.eclipse.etrice.runtime.c/.cproject
@@ -5,7 +5,13 @@
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.lib.debug.505530637">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <externalSettings/>
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Debug"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@@ -34,7 +40,10 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.1185604346" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.lib.debug.option.optimization.level.157947957" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.lib.debug.option.debugging.level.1083191317" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.790097072" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
+ <option id="gnu.c.compiler.option.include.paths.790097072" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/common}&quot;"/>
+ </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.361048721" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.597146923" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
@@ -42,8 +51,8 @@
</toolChain>
</folderInfo>
<sourceEntries>
+ <entry excluding="platforms/MSP430" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="test|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
@@ -88,7 +97,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry excluding="platforms/MSP430" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="test|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
diff --git a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
index 3885aae84..bb11a4a7d 100644
--- a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
+++ b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
Binary files differ
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etLogger.h b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h
index 6c46889a8..6c46889a8 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etLogger.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
index 9abc9be9d..4596292a7 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
@@ -10,9 +10,9 @@
*
*******************************************************************************/
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
-#include "etLogger.h"
+#include "debugging/etLogger.h"
static etFileHandle etMSCLogger_fileHandle = NULL;
static char* etMSCLogger_objectName = "";
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.h b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h
index af78894bd..b1720cec5 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMSCLogger.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h
@@ -13,7 +13,7 @@
#ifndef _ETMSCLOGGER_H_
#define _ETMSCLOGGER_H_
-#define ET_MSC_LOGGER_ACTIVATE
+#include "etGlobalFlags.h"
void etMSCLogger_open(char* logPath, char* mscName);
void etMSCLogger_close(void);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etUnit.c b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c
index f9a963664..4facacbcd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etUnit.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c
@@ -10,10 +10,10 @@
*
*******************************************************************************/
-#include "etUnit.h"
+#include "etUnit/etUnit.h"
#include <string.h>
#include <time.h>
-#include "etLogger.h"
+#include "debugging/etLogger.h"
/*** member variables */
@@ -47,7 +47,7 @@ static clock_t etUnit_currentTime = 0;
/* forward declarations of private functions */
void expect_equal_int(const char* message, etInt32 expected, etInt32 actual);
void expect_equal_uint(const char* message, etUInt32 expected, etUInt32 actual);
-void expect_equal_float(const char* message, etFloat64 expected, etFloat64 actual, etFloat64 precision);
+void expect_equal_float(const char* message, etFloat32 expected, etFloat32 actual, etFloat32 precision);
void etUnit_writeTestLog(const char *testcase, etBool result, const char *resulttext);
void etUnit_handleExpect(etBool result, const char *resulttext);
@@ -192,11 +192,7 @@ void EXPECT_EQUAL_UINT32(const char* message, etUInt32 expected, etUInt32 actual
void EXPECT_EQUAL_FLOAT32(const char* message, etFloat32 expected, etFloat32 actual, etFloat32 precision) {
- expect_equal_float(message, (etFloat64) expected, (etFloat64) actual, (etFloat64) precision);
-}
-
-void EXPECT_EQUAL_FLOAT64(const char* message, etFloat64 expected, etFloat64 actual, etFloat64 precision) {
- expect_equal_float(message, (etFloat64) expected, (etFloat64) actual, (etFloat64) precision);
+ expect_equal_float(message, expected, actual, precision);
}
/* order */
@@ -262,10 +258,10 @@ void expect_equal_uint(const char* message, etUInt32 expected, etUInt32 actual)
}
-void expect_equal_float(const char* message, etFloat64 expected, etFloat64 actual, etFloat64 precision) {
+void expect_equal_float(const char* message, etFloat32 expected, etFloat32 actual, etFloat32 precision) {
if (expected - actual < -precision || expected - actual > precision) {
char testresult[ETUNIT_FAILURE_TEXT_LEN];
- sprintf(testresult, "%s: expected=%lf, actual=%lf", message, expected, actual);
+ sprintf(testresult, "%s: expected=%f, actual=%f", message, expected, actual);
etUnit_handleExpect(FALSE, testresult);
} else {
etUnit_handleExpect(TRUE, "");
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etUnit.h b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h
index 34284c541..5daa4aa95 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etUnit.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h
@@ -45,7 +45,6 @@ void EXPECT_EQUAL_UINT32(const char* testcase, etUInt32 expected, etUInt32 actua
/* float values */
void EXPECT_EQUAL_FLOAT32(const char* testcase, etFloat32 expected, etFloat32 actual, etFloat32 precision);
-void EXPECT_EQUAL_FLOAT64(const char* testcase, etFloat64 expected, etFloat64 actual, etFloat64 precision);
/* Pointers */
#define EXPECT_EQUAL_PTR(testcase, expected, actual) \
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessage.c b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.c
index 146467c23..49772f7b6 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessage.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.c
@@ -10,9 +10,9 @@
*
*******************************************************************************/
-#include "etMessage.h"
+#include "messaging/etMessage.h"
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
#include <stddef.h>
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessage.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h
index 698a89c09..698a89c09 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessage.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.c
index 639798bc6..b1a5fea54 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.c
@@ -10,9 +10,9 @@
*
*******************************************************************************/
-#include "etMessageQueue.h"
+#include "messaging/etMessageQueue.h"
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
void etMessageQueue_init(etMessageQueue* self){
ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "init")
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h
index a303146ec..f305d1aa9 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h
@@ -13,7 +13,7 @@
#ifndef _ETMESSAGEQUEUE_H_
#define _ETMESSAGEQUEUE_H_
-#include "etMessage.h"
+#include "messaging/etMessage.h"
#include <stddef.h>
typedef struct etMessageQueue {
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h
index c75686654..a1bd92ce2 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h
@@ -15,7 +15,7 @@
#ifndef _ETMESSAGERECEIVER_H_
#define _ETMESSAGERECEIVER_H_
-#include "etMessage.h"
+#include "messaging/etMessage.h"
typedef void (*etActorReceiveMessage)(void* self, void* ifitem, const etMessage* msg);
typedef void (*etDispatcherReceiveMessage)(const etMessage* msg);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c
index 10e2fe00c..3755d2107 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c
@@ -14,8 +14,8 @@
#include "etMessageService.h"
-#include "etLogger.h"
-#include "etMSCLogger.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
void etMessageService_init(etMessageService* self, etUInt8* buffer, etUInt16 maxBlocks, etUInt16 blockSize, etDispatcherReceiveMessage msgDispatcher){
ET_MSC_LOGGER_SYNC_ENTRY("etMessageService", "init")
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
index 5997363d1..0303bbf0c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
@@ -15,8 +15,8 @@
#include <stddef.h>
#include "etDatatypes.h"
-#include "etMessageQueue.h"
-#include "etMessageReceiver.h"
+#include "messaging/etMessageQueue.h"
+#include "messaging/etMessageReceiver.h"
typedef struct etBuffer{
etUInt8 *buffer;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etActor.c b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c
index 008a6474d..12d3808f0 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etActor.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-#include "etActor.h"
+#include "modelbase/etActor.h"
boolean handleSystemEvent(InterfaceItemBase ifitem, int evt, void* generic_data) {
/* TODO */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etActor.h b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h
index 5cd70f694..88b6178cd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etActor.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h
@@ -13,8 +13,8 @@
#ifndef _ETACTOR_H_
#define _ETACTOR_H_
-#include "etDataTypes.h"
-#include "etPort.h"
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
#define NOT_CAUGHT 0
#define EVT_SHIFT 100
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etPort.c b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
index 24f22043d..90b0f19cb 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etPort.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
@@ -10,9 +10,11 @@
*
*******************************************************************************/
-#include "etPort.h"
+#include "modelbase/etPort.h"
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "platform/etMemory.h"
+#include <string.h>
void etPort_receive(const etPort* self, const etMessage* msg) {
ET_MSC_LOGGER_SYNC_ENTRY("etPort", "receive")
@@ -22,9 +24,18 @@ void etPort_receive(const etPort* self, const etMessage* msg) {
}
-void etPort_sendMessage(const etPort* self, etInt16 evtId) {
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = evtId;
- etMessageService_pushMessage(self->msgService, msg);
+void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data) {
+ int offset = MEM_CEIL(sizeof(etMessage));
+ int totalSize = offset+size;
+ etMessage* msg = etMessageService_getMessageBuffer(self->msgService, totalSize);
+ if (msg!=NULL) {
+ msg->address = self->peerAddress;
+ msg->evtID = evtId;
+
+ if (size>0 && data!=NULL) {
+ memcpy(((char*)msg)+offset, data, size);
+ }
+
+ etMessageService_pushMessage(self->msgService, msg);
+ }
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etPort.h b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h
index 797adb9ad..49321065a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etPort.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h
@@ -16,9 +16,9 @@
#define _ETPORT_H_
-#include "etMessage.h"
-#include "etMessageReceiver.h"
-#include "etMessageService.h"
+#include "messaging/etMessage.h"
+#include "messaging/etMessageReceiver.h"
+#include "messaging/etMessageService.h"
typedef struct {
void* myActor;
@@ -55,7 +55,7 @@ typedef struct {
typedef etPort* InterfaceItemBase;
void etPort_receive(const etPort* self, const etMessage* msg);
-void etPort_sendMessage(const etPort* self, etInt16 evtId);
+void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etMemory.h b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etMemory.h
new file mode 100644
index 000000000..997c7053c
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etMemory.h
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _ETMEMORY_H_
+#define _ETMEMORY_H_
+
+#include "etDatatypes.h"
+#include "etGlobalFlags.h"
+
+#define CONSTANT_MEM_CEIL(n) \
+ ((n)+(((int32)STRUCT_ALIGN-((n)&((int32)STRUCT_ALIGN-1)))&((int32)STRUCT_ALIGN-1)))
+
+#define MEM_ALIGNMENT STRUCT_ALIGN /* power of 2 and >= sizeof(int) ! */
+#define MEM_CEIL(n) CONSTANT_MEM_CEIL(n)
+
+/* pool and block size */
+#define MESSAGE_POOL_MAX 50
+#define MESSAGE_BLOCK_SIZE 64
+
+#endif /* _ETMEMORY_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h
new file mode 100644
index 000000000..1f3c17ec3
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+/*
+ * etPlatform.h defines a generic interface for platform specific implementations
+ *
+ * */
+
+/*
+ * Platform startup and shutdown -> generated code for SubSystemClass uses these interfaces
+ * */
+
+void etUserEntry(void);
+void etUserPreRun(void);
+/* void etUserRun(void); */ /* TODO: do we need this function? */
+void etUserPostRun(void);
+void etUserExit(void);
+
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etDatatypes.h
new file mode 100644
index 000000000..a831f66ff
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etDatatypes.h
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _ETDATATYPES_H_
+#define _ETDATATYPES_H_
+
+/*
+ * typedefs for platform specific datatypes
+ * Version for TI MSP 430
+ *
+ * */
+
+#include <stdio.h>
+
+/* unsigned integer datatypes */
+typedef unsigned char uint8;
+typedef unsigned short int uint16;
+typedef unsigned long uint32;
+/* typedef unsigned long long uint64; */ /* not available on this platform */
+
+/* signed integer datatypes */
+typedef char int8;
+typedef short int int16;
+typedef long int32;
+/* typedef long long int64; */ /* not available on this platform */
+
+
+/* float datatypes */
+typedef float float32;
+/* typedef double float64; */ /* not available on this platform */
+
+/* boolean datatypes and values */
+typedef char bool; /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
+typedef bool boolean;
+#ifndef TRUE
+ #define TRUE 1
+#endif
+#ifndef FALSE
+ #define FALSE 0
+#endif
+
+/*
+ * typedefs for eTrice Runtime and Testing
+ *
+ * */
+
+typedef int8 etInt8;
+typedef int16 etInt16;
+typedef int32 etInt32;
+
+typedef uint8 etUInt8;
+typedef uint16 etUInt16;
+typedef uint32 etUInt32;
+
+typedef bool etBool;
+
+typedef float32 etFloat32;
+
+typedef FILE* etFileHandle;
+
+typedef int8 etAddressId;
+
+#endif /* _DATATYPES_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etGlobalFlags.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etGlobalFlags.h
new file mode 100644
index 000000000..90105e67f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etGlobalFlags.h
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ETGLOBALFLAGS_H_
+#define ETGLOBALFLAGS_H_
+
+/* flags for debugging */
+#define ET_MSC_LOGGER_ACTIVATE /* needs ET_LOGGER_ACTIVATE */
+#define ET_LOGGER_ACTIVATE
+
+
+
+#endif /* ETGLOBALFLAGS_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etLogger.c
index 13c2fea0a..d43a953ba 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etLogger.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etLogger.c
@@ -18,7 +18,7 @@
*/
-#include "etLogger.h"
+#include "debugging/etLogger.h"
#include <stdarg.h>
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c
new file mode 100644
index 000000000..e3265ad0a
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "msp430f5438a.h"
+#include "hal_MSP-EXP430F5438.h"
+
+/* forward declarations */
+static void prvSetupHardware(void);
+void initIO(void);
+
+
+/* implemenatation for eTrice interfaces*/
+
+void etUserEntry(void){
+ prvSetupHardware();
+}
+
+void etUserPreRun(void){
+ //_enable_interrupt();
+}
+
+void etUserPostRun(void){ }
+void etUserExit(void){ }
+
+
+/* platform specific functions */
+
+static void prvSetupHardware(void) {
+ /* Convert a Hz value to a KHz value, as required by the Init_FLL_Settle()
+ function. */
+ unsigned long ulCPU_Clock_KHz = (25000000UL / 1000UL );
+
+ /* Disable the watchdog. */
+ WDTCTL = WDTPW + 0x36;
+
+ halBoardInit();
+
+ LFXT_Start(XT1DRIVE_0);
+ Init_FLL_Settle((unsigned short) ulCPU_Clock_KHz, 488);
+
+ halButtonsInit(BUTTON_ALL);
+ halButtonsInterruptEnable(BUTTON_SELECT);
+
+ /* Initialise the LCD, but note that the backlight is not used as the
+ library function uses timer A0 to modulate the backlight, and this file
+ defines vApplicationSetupTimerInterrupt() to also use timer A0 to generate
+ the tick interrupt. If the backlight is required, then change either the
+ halLCD library or vApplicationSetupTimerInterrupt() to use a different
+ timer. Timer A1 is used for the run time stats time base6. */
+ halLcdInit();
+ halLcdSetContrast(105);
+ halLcdClearScreen();
+ halLcdBackLightInit();
+ halLcdSetBackLight(10);
+
+ halLcdPrintLine(" eTrice on MSP430", 1, OVERWRITE_TEXT);
+
+ //initIO();
+}
+
+
+#pragma INTERRUPT(wdt_isr)
+#pragma vector=WDT_VECTOR
+void wdt_isr(void) {
+// this interrupt will be called every 15,625ms
+ static unsigned char secCounter = 0;
+
+ secCounter++;
+
+ if (secCounter >= 64) {
+ secCounter = 0;
+ P1OUT ^= 0x01;
+ }
+} // end interrupt
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/info.txt b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/info.txt
new file mode 100644
index 000000000..71c5f9f3f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/info.txt
@@ -0,0 +1 @@
+TI-MSP430
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h
index bf161f396..aac2ec338 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h
@@ -15,6 +15,7 @@
/*
* typedefs for platform specific datatypes
+ * generic Version for most bigger 32 and 64 bit platforms like Linux an Windows
*
* */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etGlobalFlags.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etGlobalFlags.h
new file mode 100644
index 000000000..647dbab9b
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etGlobalFlags.h
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ETGLOBALFLAGS_H_
+#define ETGLOBALFLAGS_H_
+
+/* flags for debugging */
+#define ET_MSC_LOGGER_ACTIVATE /* needs ET_LOGGER_ACTIVATE */
+#define ET_LOGGER_ACTIVATE
+
+
+#define STRUCT_ALIGN 8
+
+
+#endif /* ETGLOBALFLAGS_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etLogger.c
new file mode 100644
index 000000000..f68276960
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etLogger.c
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "debugging/etLogger.h"
+
+#include <stdarg.h>
+
+
+void etLogger_logError(const char* message){
+ printf("ERROR: %s\n", message);
+}
+
+void etLogger_logWarning(const char* message){
+ printf("WARNING: %s\n", message);
+}
+
+void etLogger_logInfo(const char* message){
+ printf("INFO: %s\n", message);
+}
+
+void etLogger_logErrorF(const char* format, ... ){
+ printf("ERROR: ");
+ va_list arglist;
+ va_start( arglist, format );
+ vprintf( format, arglist );
+ va_end( arglist );
+ printf("\n");
+}
+
+void etLogger_logWarningF(const char* format, ... ){
+ printf("WARNING: ");
+ va_list arglist;
+ va_start( arglist, format );
+ vprintf( format, arglist );
+ va_end( arglist );
+ printf("\n");
+}
+
+void etLogger_logInfoF(const char* format, ... ){
+ printf("INFO: ");
+ va_list arglist;
+ va_start( arglist, format );
+ vprintf( format, arglist );
+ va_end( arglist );
+ printf("\n");
+}
+
+etFileHandle etLogger_fopen(const char* filename, const char* mode){
+ return( fopen(filename, mode) );
+}
+
+int etLogger_fclose(etFileHandle file){
+ return( fclose(file) );
+}
+
+void etLogger_fprintf(etFileHandle file, const char* format, ... ){
+ va_list arglist;
+ va_start( arglist, format );
+ vfprintf(file, format, arglist );
+ va_end( arglist );
+}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c
new file mode 100644
index 000000000..5a4115f8c
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/* implemenatation for eTrice interfaces*/
+
+void etUserEntry(void){ }
+
+void etUserPreRun(void){ }
+
+void etUserPostRun(void){ }
+
+void etUserExit(void){ }
+
+
+/* platform specific functions */
+
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/info.txt b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/info.txt
new file mode 100644
index 000000000..a2ac1f6d4
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/info.txt
@@ -0,0 +1,2 @@
+This generic platform can be used for most 32 or 64 bit systems like windows and linux.
+It uses standard c libraries only and it makes use of the file system.
diff --git a/tests/org.eclipse.etrice.generator.c.tests/.cproject b/tests/org.eclipse.etrice.generator.c.tests/.cproject
index f811adc92..8b220ecb5 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/.cproject
+++ b/tests/org.eclipse.etrice.generator.c.tests/.cproject
@@ -1,150 +1,159 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.918285240" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1377401325" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1914462916" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
- <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1636502349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1864486752" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.321169512" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1151544407" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
- <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
- </option>
- <option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
- <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
- <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
- </option>
- <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1941302758" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
- <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
- </storageModule>
- </cconfiguration>
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" moduleId="org.eclipse.cdt.core.settings" name="Release">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.44614125" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1563670810" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.748437960" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.2087319745" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
- <option id="gnu.both.asm.option.include.paths.2089558096" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1375308303" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.245787891" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1042972525" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
- <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.1950851559" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.373334651" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
- <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.554911279" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.331396171" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.156681579" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1192709765" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
- <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
- <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
- </option>
- <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Release}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1107454825" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1557729682" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
- <entry excluding="runtime/RMessageQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
- <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.release.406040144" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
- <externalSetting>
- <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
- <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Release"/>
- <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
- </externalSetting>
- </externalSettings>
- </storageModule>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="org.eclipse.etrice.generator.c.tests.cdt.managedbuild.target.gnu.mingw.exe.44532741" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550;cdt.managedbuild.config.gnu.mingw.exe.debug.54263550.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303;cdt.managedbuild.tool.gnu.c.compiler.input.215126527">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435;cdt.managedbuild.config.gnu.mingw.exe.release.1445732435.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430;cdt.managedbuild.tool.gnu.c.compiler.input.156681579">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="refreshScope" versionNumber="1">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.generator.c.tests"/>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-</cproject>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.918285240" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1377401325" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1914462916" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
+ <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1636502349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1864486752" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.321169512" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1151544407" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
+ <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/common}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/platforms/generic}&quot;"/>
+ </option>
+ <option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
+ <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1941302758" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
+ <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Debug"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
+ </storageModule>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.44614125" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1563670810" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.748437960" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.2087319745" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
+ <option id="gnu.both.asm.option.include.paths.2089558096" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1375308303" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.245787891" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1042972525" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.1950851559" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.373334651" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.554911279" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.331396171" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.156681579" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1192709765" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
+ <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Release}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1107454825" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1557729682" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
+ <entry excluding="runtime/RMessageQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
+ <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.release.406040144" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Release"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
+ </storageModule>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="org.eclipse.etrice.generator.c.tests.cdt.managedbuild.target.gnu.mingw.exe.44532741" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550;cdt.managedbuild.config.gnu.mingw.exe.debug.54263550.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303;cdt.managedbuild.tool.gnu.c.compiler.input.215126527">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435;cdt.managedbuild.config.gnu.mingw.exe.release.1445732435.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430;cdt.managedbuild.tool.gnu.c.compiler.input.156681579">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="1">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.generator.c.tests"/>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+</cproject>
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
index 7683d9062..f89049ff7 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
@@ -9,13 +9,12 @@
#include <string.h>
-//--------------------- begin user code
+/*--------------------- begin user code ---------------------*/
// usercode3
-//--------------------- end user code
+/*--------------------- end user code ---------------------*/
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value) {
return self->Attr1*value;
}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
index 948491f86..f1d7a6fb0 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
@@ -10,31 +10,30 @@
#include "etDatatypes.h"
-/* TODO: includes only for used DataClasses, also for other models */
#include "DataClass2.h"
-//--------------------- begin user code
+/*--------------------- begin user code ---------------------*/
// usercode1
-//--------------------- end user code
+/*--------------------- end user code ---------------------*/
typedef struct {
- //--------------------- begin user code
- // usercode2
- //--------------------- end user code
- //--------------------- attributes
+ /*--------------------- attributes ---------------------*/
int32 Attr1;
DataClass2 ComplexAttr;
float32 Attr3;
} DataClass1;
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value);
float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
-// deep copy
+/* deep copy */
void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
+/*--------------------- begin user code ---------------------*/
+ // usercode2
+/*--------------------- end user code ---------------------*/
+
#endif /* _DATACLASS1_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
index 1fd7e1572..ab4bbb274 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
@@ -10,9 +10,8 @@
#include <string.h>
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
void DataClass2_Operation1(DataClass2* self) {
/*nothing to do*/
}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
index 4b1f3164f..4b08b4125 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
@@ -10,23 +10,22 @@
#include "etDatatypes.h"
-/* TODO: includes only for used DataClasses, also for other models */
typedef struct {
- //--------------------- attributes
+ /*--------------------- attributes ---------------------*/
int32 Attr1;
float32 Attr2;
int32 Attr3;
} DataClass2;
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
void DataClass2_Operation1(DataClass2* self);
-// deep copy
+/* deep copy */
void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
+
#endif /* _DATACLASS2_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
index d62450db8..38bfdfbdb 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
@@ -14,7 +14,7 @@
#include "test/generator/RunCGeneratorTestcases.h"
#include "test/runtime/RunCRuntimeTestcases.h"
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
void runTestCases(void);
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
index 615ba7422..ae0e95690 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
@@ -20,8 +20,8 @@
#include "RunCGeneratorTestcases.h"
#include "TestDataClass.h"
-#include "etUnit.h"
-#include "etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "debugging/etMSCLogger.h"
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
index e3c521dd3..b41cfa60c 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestDataClass.c
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-
-#include "TestDataClass.h"
-
-#include "etUnit.h"
-
-#include "../../../src-gen/cGenRef/DataClass1.h"
-
-void TestDataClass_Operations(void){
-
- DataClass1 d;
- d.Attr1 = 123;
- d.ComplexAttr.Attr1 = 456;
- d.ComplexAttr.Attr2 = (float32)789.123;
- d.ComplexAttr.Attr3 = 789;
- d.Attr3 = (float32)321.123;
-
- EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
- EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
-
-}
-
-
-void TestDataClass_testDataClassDeepCopy(void){
-
- DataClass1 d, e;
- d.Attr1 = 123;
- d.ComplexAttr.Attr1 = 456;
- d.ComplexAttr.Attr2 = (float32)789.123;
- d.ComplexAttr.Attr3 = 789;
- d.Attr3 = (float32)321.123;
-
- DataClass1_deepCopy(&d,&e);
-
- EXPECT_EQUAL_INT32("Attr1", 123, e.Attr1);
- EXPECT_EQUAL_INT32("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
- EXPECT_EQUAL_FLOAT32("ComplexAttr.Attr2", (float32)789.123, e.ComplexAttr.Attr2, 0.001f);
- EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
- EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
-
-}
-
-void TestDataClass_runSuite(void){
- etUnit_openTestSuite("TestDataClass");
- ADD_TESTCASE(TestDataClass_Operations);
- ADD_TESTCASE(TestDataClass_testDataClassDeepCopy);
- etUnit_closeTestSuite();
-}
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * TestDataClass.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+#include "TestDataClass.h"
+
+#include "etUnit/etUnit.h"
+
+#include "../../../src-gen/cGenRef/DataClass1.h"
+
+void TestDataClass_Operations(void){
+
+ DataClass1 d;
+ d.Attr1 = 123;
+ d.ComplexAttr.Attr1 = 456;
+ d.ComplexAttr.Attr2 = (float32)789.123;
+ d.ComplexAttr.Attr3 = 789;
+ d.Attr3 = (float32)321.123;
+
+ EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
+ EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
+
+}
+
+
+void TestDataClass_testDataClassDeepCopy(void){
+
+ DataClass1 d, e;
+ d.Attr1 = 123;
+ d.ComplexAttr.Attr1 = 456;
+ d.ComplexAttr.Attr2 = (float32)789.123;
+ d.ComplexAttr.Attr3 = 789;
+ d.Attr3 = (float32)321.123;
+
+ DataClass1_deepCopy(&d,&e);
+
+ EXPECT_EQUAL_INT32("Attr1", 123, e.Attr1);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
+ EXPECT_EQUAL_FLOAT32("ComplexAttr.Attr2", (float32)789.123, e.ComplexAttr.Attr2, 0.001f);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
+ EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
+
+}
+
+void TestDataClass_runSuite(void){
+ etUnit_openTestSuite("TestDataClass");
+ ADD_TESTCASE(TestDataClass_Operations);
+ ADD_TESTCASE(TestDataClass_testDataClassDeepCopy);
+ etUnit_closeTestSuite();
+}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
index a9a502f3b..bc60644c3 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
@@ -1,49 +1,49 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * RunRuntimeTestcases.c
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-
-
-#include "RunCRuntimeTestcases.h"
-
-#include "TestEtMessage.h"
-#include "TestEtMessageQueue.h"
-#include "TestEtMessageService.h"
-#include "TestEtUnit.h"
-
-#include "etUnit.h"
-
-
-void RunCRuntimeTestcases(void){
- etUnit_open("tmp/testlog","TestCRuntime");
-
- TestEtMessage_runSuite();
- TestEtMessageQueue_runSuite();
- TestEtMessageService_runSuite();
- TestEtUnit_runSuite();
-
- etUnit_close();
-
- /* special situation for testing openAll and closeAll of etUnit
- * this has to be done outside of etUnit_open and etUnit_close */
- etUnit_openAll("tmp/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
- EXPECT_TRUE("Open and Close", TRUE);
- etUnit_closeAll();
-}
-
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * RunRuntimeTestcases.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+
+#include "RunCRuntimeTestcases.h"
+
+#include "TestEtMessage.h"
+#include "TestEtMessageQueue.h"
+#include "TestEtMessageService.h"
+#include "TestEtUnit.h"
+
+#include "etUnit/etUnit.h"
+
+
+void RunCRuntimeTestcases(void){
+ etUnit_open("tmp/testlog","TestCRuntime");
+
+ TestEtMessage_runSuite();
+ TestEtMessageQueue_runSuite();
+ TestEtMessageService_runSuite();
+ TestEtUnit_runSuite();
+
+ etUnit_close();
+
+ /* special situation for testing openAll and closeAll of etUnit
+ * this has to be done outside of etUnit_open and etUnit_close */
+ etUnit_openAll("tmp/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
+ EXPECT_TRUE("Open and Close", TRUE);
+ etUnit_closeAll();
+}
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
index c360b0a84..ed317284f 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessage.h"
-
-#include <stddef.h>
-#include "etUnit.h"
-#include "etMessage.h"
-
-
-
-void TestEtMessage_testBasicMessage(void){
-
- etMessage msg1 = {(etMessage*)1234567, 123,456,};
- etMessage msg2 = {NULL, 222,333};
-
- // basic checks -> detects structure changes that would cause problems for generated code
- EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
- EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
- EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
-
- // build pointer ring
- msg1.next = &msg2;
- msg2.next = &msg1;
-
- EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
- EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
-
-}
-
-void TestEtMessage_runSuite(void){
- etUnit_openTestSuite("TestMessage");
- ADD_TESTCASE(TestEtMessage_testBasicMessage);
- etUnit_closeTestSuite();
-}
-
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "TestEtMessage.h"
+
+#include <stddef.h>
+#include "etUnit/etUnit.h"
+#include "messaging/etMessage.h"
+
+
+
+void TestEtMessage_testBasicMessage(void){
+
+ etMessage msg1 = {(etMessage*)1234567, 123,456,};
+ etMessage msg2 = {NULL, 222,333};
+
+ // basic checks -> detects structure changes that would cause problems for generated code
+ EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
+ EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
+ EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
+
+ // build pointer ring
+ msg1.next = &msg2;
+ msg2.next = &msg1;
+
+ EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
+ EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
+
+}
+
+void TestEtMessage_runSuite(void){
+ etUnit_openTestSuite("TestMessage");
+ ADD_TESTCASE(TestEtMessage_testBasicMessage);
+ etUnit_closeTestSuite();
+}
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
index 3a453962c..1febd72ce 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
@@ -1,99 +1,99 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessageQueue.h"
-#include "etUnit.h"
-#include "etMessageQueue.h"
-
-void TestEtMessageQueue_testPushPop(void){
-
- etMessage msg1 = {NULL, 123, 456};
- etMessage msg2 = {NULL, 222, 333};
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- etMessageQueue_push(&queue1, &msg1);
- etMessageQueue_push(&queue1, &msg2);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size before", 2, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark before", 2, queue1.highWaterMark);
-
- etMessage* rcvMsg1 = etMessageQueue_pop(&queue1);
- etMessage* rcvMsg2 = etMessageQueue_pop(&queue1);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size after", 0, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark after", 2, queue1.highWaterMark);
-
- EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
- EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
- EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
-
- EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
- EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
- EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
-
- EXPECT_EQUAL_PTR("etMessageQueue->first", NULL, queue1.first);
- EXPECT_EQUAL_PTR("etMessageQueue->last", NULL, queue1.last);
-
- etMessage* rcvMsg3 = etMessageQueue_pop(&queue1);
- EXPECT_EQUAL_PTR("etMessageQueue_pop if empty", NULL, rcvMsg3);
-
-}
-
-#define MAX 1000
-
-void TestEtMessageQueue_testMassiveMessaging(void){
-
- etMessage msgArray[MAX];
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- int16 i;
- for(i=0; i<MAX; i++){
- //etMessage_init(&msgArray[i]);
- msgArray[i].address = i;
- msgArray[i].evtID = i;
- }
-
- int j;
- for(j=0; j<3; j++){
- for (i=0; i<MAX; i++){
- etMessageQueue_push(&queue1, &(msgArray[i]));
- }
- for (i=0; i<MAX; i++){
- etMessage* msg = etMessageQueue_pop(&queue1);
- // EXPECTS are hidden to avoid too many testcases in log
- if (msg == NULL){
- EXPECT_FALSE("msg == NULL", TRUE);
- break;
- }
- if (msg->address != msg->evtID){
- EXPECT_FALSE("msg->address != msg->evtID", TRUE);
- break;
- }
- if (msg->address != i){
- EXPECT_FALSE("msg->address != i", TRUE);
- break;
- }
- }
- EXPECT_EQUAL_INT32("i==MAX", MAX, i);
- }
-}
-
-void TestEtMessageQueue_runSuite(void){
- etUnit_openTestSuite("TestEtMessageQueue");
- ADD_TESTCASE(TestEtMessageQueue_testPushPop);
- ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
- etUnit_closeTestSuite();
-}
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "TestEtMessageQueue.h"
+#include "etUnit/etUnit.h"
+#include "messaging/etMessageQueue.h"
+
+void TestEtMessageQueue_testPushPop(void){
+
+ etMessage msg1 = {NULL, 123, 456};
+ etMessage msg2 = {NULL, 222, 333};
+
+ etMessageQueue queue1;
+ etMessageQueue_init(&queue1);
+
+ etMessageQueue_push(&queue1, &msg1);
+ etMessageQueue_push(&queue1, &msg2);
+
+ EXPECT_EQUAL_INT16("etMessageQueue.size before", 2, queue1.size);
+ EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark before", 2, queue1.highWaterMark);
+
+ etMessage* rcvMsg1 = etMessageQueue_pop(&queue1);
+ etMessage* rcvMsg2 = etMessageQueue_pop(&queue1);
+
+ EXPECT_EQUAL_INT16("etMessageQueue.size after", 0, queue1.size);
+ EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark after", 2, queue1.highWaterMark);
+
+ EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
+ EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
+
+ EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
+ EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
+
+ EXPECT_EQUAL_PTR("etMessageQueue->first", NULL, queue1.first);
+ EXPECT_EQUAL_PTR("etMessageQueue->last", NULL, queue1.last);
+
+ etMessage* rcvMsg3 = etMessageQueue_pop(&queue1);
+ EXPECT_EQUAL_PTR("etMessageQueue_pop if empty", NULL, rcvMsg3);
+
+}
+
+#define MAX 1000
+
+void TestEtMessageQueue_testMassiveMessaging(void){
+
+ etMessage msgArray[MAX];
+
+ etMessageQueue queue1;
+ etMessageQueue_init(&queue1);
+
+ int16 i;
+ for(i=0; i<MAX; i++){
+ //etMessage_init(&msgArray[i]);
+ msgArray[i].address = i;
+ msgArray[i].evtID = i;
+ }
+
+ int j;
+ for(j=0; j<3; j++){
+ for (i=0; i<MAX; i++){
+ etMessageQueue_push(&queue1, &(msgArray[i]));
+ }
+ for (i=0; i<MAX; i++){
+ etMessage* msg = etMessageQueue_pop(&queue1);
+ // EXPECTS are hidden to avoid too many testcases in log
+ if (msg == NULL){
+ EXPECT_FALSE("msg == NULL", TRUE);
+ break;
+ }
+ if (msg->address != msg->evtID){
+ EXPECT_FALSE("msg->address != msg->evtID", TRUE);
+ break;
+ }
+ if (msg->address != i){
+ EXPECT_FALSE("msg->address != i", TRUE);
+ break;
+ }
+ }
+ EXPECT_EQUAL_INT32("i==MAX", MAX, i);
+ }
+}
+
+void TestEtMessageQueue_runSuite(void){
+ etUnit_openTestSuite("TestEtMessageQueue");
+ ADD_TESTCASE(TestEtMessageQueue_testPushPop);
+ ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
+ etUnit_closeTestSuite();
+}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
index 867576097..9c1499ea8 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
@@ -11,8 +11,8 @@
*******************************************************************************/
#include "TestEtMessageService.h"
-#include "etUnit.h"
-#include "etMessageService.h"
+#include "etUnit/etUnit.h"
+#include "messaging/etMessageService.h"
/* mocking for MessageDispatcher */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
index 43a85baee..22bd62dc5 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _TESTRMESSAGESERVICE_H_
-#define _TESTRMESSAGESERVICE_H_
-
-#include "etMessageService.h"
-
-void TestEtMessageService_runSuite(void);
-
-
-#endif /* _TESTRMESSAGESERVICE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _TESTRMESSAGESERVICE_H_
+#define _TESTRMESSAGESERVICE_H_
+
+#include "messaging/etMessageService.h"
+
+void TestEtMessageService_runSuite(void);
+
+
+#endif /* _TESTRMESSAGESERVICE_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
index 3f01d0587..f69abb441 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestEtUnit.c
- *
- * Created on: 16.01.2012
- * Author: tschuetz
- */
-
-#include "TestEtUnit.h"
-#include "etUnit.h"
-
-void TestEtUnit_Expect(void){
- EXPECT_TRUE("EXPECT_TRUE", TRUE);
- EXPECT_FALSE("EXPECT_FALSE", FALSE);
-
- /* signed integer values */
- EXPECT_EQUAL_INT8("EXPECT_EQUAL_INT8", -123, -123);
- EXPECT_EQUAL_INT16("EXPECT_EQUAL_INT16", -12345, -12345);
- EXPECT_EQUAL_INT32("EXPECT_EQUAL_INT32", -1234567, -1234567);
-
- /* unsigned integer values */
- EXPECT_EQUAL_UINT8("EXPECT_EQUAL_INT8", 123, 123);
- EXPECT_EQUAL_UINT16("EXPECT_EQUAL_INT16", 12345, 12345);
- EXPECT_EQUAL_UINT32("EXPECT_EQUAL_INT32", 1234567, 1234567);
-
- /* float values */
- EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
- EXPECT_EQUAL_FLOAT64("EXPECT_EQUAL_FLOAT64", (etFloat64) 123.456, (etFloat64) 123.456, (etFloat64) 0.0001);
-
- /* Pointers */
- etUInt16 value;
- etUInt16* valuePtr = &value;
-
- EXPECT_EQUAL_PTR("EXPECT_EQUAL_PTR", &value, valuePtr) \
-
-}
-
-
-void TestEtUnit_Expect_Order(void){
- etInt16 list[] = {1,2,3,4};
- EXPECT_ORDER_START(list, 4);
- EXPECT_ORDER("id=1", 1);
- EXPECT_ORDER("id=2", 2);
- EXPECT_ORDER("id=3", 3);
- EXPECT_ORDER_END("id=4", 4);
-}
-
-void TestEtUnit_runSuite(void){
- etUnit_openTestSuite("TestEtUnit");
- ADD_TESTCASE(TestEtUnit_Expect_Order);
- ADD_TESTCASE(TestEtUnit_Expect);
- etUnit_closeTestSuite();
-}
-
-
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * TestEtUnit.c
+ *
+ * Created on: 16.01.2012
+ * Author: tschuetz
+ */
+
+#include "TestEtUnit.h"
+#include "etUnit/etUnit.h"
+
+void TestEtUnit_Expect(void){
+ EXPECT_TRUE("EXPECT_TRUE", TRUE);
+ EXPECT_FALSE("EXPECT_FALSE", FALSE);
+
+ /* signed integer values */
+ EXPECT_EQUAL_INT8("EXPECT_EQUAL_INT8", -123, -123);
+ EXPECT_EQUAL_INT16("EXPECT_EQUAL_INT16", -12345, -12345);
+ EXPECT_EQUAL_INT32("EXPECT_EQUAL_INT32", -1234567, -1234567);
+
+ /* unsigned integer values */
+ EXPECT_EQUAL_UINT8("EXPECT_EQUAL_INT8", 123, 123);
+ EXPECT_EQUAL_UINT16("EXPECT_EQUAL_INT16", 12345, 12345);
+ EXPECT_EQUAL_UINT32("EXPECT_EQUAL_INT32", 1234567, 1234567);
+
+ /* float values */
+ EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
+ EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
+
+ /* Pointers */
+ etUInt16 value;
+ etUInt16* valuePtr = &value;
+
+ EXPECT_EQUAL_PTR("EXPECT_EQUAL_PTR", &value, valuePtr) \
+
+}
+
+
+void TestEtUnit_Expect_Order(void){
+ etInt16 list[] = {1,2,3,4};
+ EXPECT_ORDER_START(list, 4);
+ EXPECT_ORDER("id=1", 1);
+ EXPECT_ORDER("id=2", 2);
+ EXPECT_ORDER("id=3", 3);
+ EXPECT_ORDER_END("id=4", 4);
+}
+
+void TestEtUnit_runSuite(void){
+ etUnit_openTestSuite("TestEtUnit");
+ ADD_TESTCASE(TestEtUnit_Expect_Order);
+ ADD_TESTCASE(TestEtUnit_Expect);
+ etUnit_closeTestSuite();
+}
+
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml b/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
index 54d6818aa..a59852cc4 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
+++ b/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
@@ -4,7 +4,7 @@
</testsuite>
<testsuite name="TestEtMessageQueue" tests="0" failures="0" errors="0" time="0">
<testcase name="TestEtMessageQueue_testPushPop" time="0"/>
- <testcase name="TestEtMessageQueue_testMassiveMessaging" time="0"/>
+ <testcase name="TestEtMessageQueue_testMassiveMessaging" time="15"/>
</testsuite>
<testsuite name="TestEtMessageService" tests="0" failures="0" errors="0" time="0">
<testcase name="TestEtMessageService_init" time="0"/>

Back to the top